serenity icon indicating copy to clipboard operation
serenity copied to clipboard

LibWeb: Invert return value from EventHandler key event handling methods

Open tcl3 opened this issue 1 year ago • 1 comments

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.

Fixes #23159

tcl3 avatar Feb 12 '24 18:02 tcl3

Maybe good to return an enum class instead of a bool so that this impossible to get wrong?

nico avatar Feb 12 '24 18:02 nico

Agree with nico although we can do that as a bigger change :)

awesomekling avatar Feb 23 '24 08:02 awesomekling