1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:28:11 +00:00

WindowsServer: Add scancode value to KeyEvent

This commit is contained in:
Hüseyin ASLITÜRK 2020-05-30 15:54:02 +03:00 committed by Andreas Kling
parent c6f1962919
commit 9ec6ac31b8
4 changed files with 11 additions and 6 deletions

View file

@ -304,14 +304,16 @@ void Window::event(Core::Event& event)
Messages::WindowClient::KeyDown(m_window_id,
(u8) static_cast<const KeyEvent&>(event).character(),
(u32) static_cast<const KeyEvent&>(event).key(),
static_cast<const KeyEvent&>(event).modifiers()));
static_cast<const KeyEvent&>(event).modifiers(),
(u32) static_cast<const KeyEvent&>(event).scancode()));
break;
case Event::KeyUp:
m_client->post_message(
Messages::WindowClient::KeyUp(m_window_id,
(u8) static_cast<const KeyEvent&>(event).character(),
(u32) static_cast<const KeyEvent&>(event).key(),
static_cast<const KeyEvent&>(event).modifiers()));
static_cast<const KeyEvent&>(event).modifiers(),
(u32) static_cast<const KeyEvent&>(event).scancode()));
break;
case Event::WindowActivated:
m_client->post_message(Messages::WindowClient::WindowActivated(m_window_id));