mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
LibGUI: Allow activating a focused button by pressing the space key :^)
This applies to normal push buttons, checkboxes, and radio buttons. It feels very natural. Even moreso than activating with return..
This commit is contained in:
@@ -155,7 +155,7 @@ void AbstractButton::leave_event(Core::Event&)
|
||||
|
||||
void AbstractButton::keydown_event(KeyEvent& event)
|
||||
{
|
||||
if (event.key() == KeyCode::Key_Return) {
|
||||
if (event.key() == KeyCode::Key_Return || event.key() == KeyCode::Key_Space) {
|
||||
click(event.modifiers());
|
||||
event.accept();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user