mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-22 17:31:58 -05:00
LibWeb: Invert return value from EventHandler key event handling methods
`EventHandler::handle_keyup()` and `EventHandler::handle_keydown()` return true if the event has been handled and false otherwise. This is the opposite behavior to `EventHandler::fire_keyboard_event()`. This change inverts the return value from `fire_keyboard_event` in these methods, allowing shortcut keys to be propagated to the Serenity Browser UI as expected.
This commit is contained in:
parent
7eec2d6c21
commit
b073fdd570
1 changed files with 2 additions and 2 deletions
|
@ -851,12 +851,12 @@ bool EventHandler::handle_keydown(KeyCode key, u32 modifiers, u32 code_point)
|
|||
}
|
||||
|
||||
// FIXME: Work out and implement the difference between this and keydown.
|
||||
return fire_keyboard_event(UIEvents::EventNames::keypress, m_browsing_context, key, modifiers, code_point);
|
||||
return !fire_keyboard_event(UIEvents::EventNames::keypress, m_browsing_context, key, modifiers, code_point);
|
||||
}
|
||||
|
||||
bool EventHandler::handle_keyup(KeyCode key, u32 modifiers, u32 code_point)
|
||||
{
|
||||
return fire_keyboard_event(UIEvents::EventNames::keyup, m_browsing_context, key, modifiers, code_point);
|
||||
return !fire_keyboard_event(UIEvents::EventNames::keyup, m_browsing_context, key, modifiers, code_point);
|
||||
}
|
||||
|
||||
void EventHandler::set_mouse_event_tracking_paintable(Painting::Paintable* paintable)
|
||||
|
|
Loading…
Reference in a new issue