LibWeb: Ignore key presses when the OS super key is also pressed

Most shortcuts on macOS are activated with the super (command) key. For
now, we should ignore these like we ignore ctrl key modifiers.
This commit is contained in:
Timothy Flynn 2024-03-16 19:50:39 -04:00 committed by Alexander Kalenik
parent 6c26ff567e
commit 4a476c3dd5
Notes: sideshowbarker 2024-07-17 03:03:15 +09:00

View File

@ -700,7 +700,7 @@ bool EventHandler::focus_previous_element()
constexpr bool should_ignore_keydown_event(u32 code_point, u32 modifiers)
{
if (modifiers & (KeyModifier::Mod_Ctrl | KeyModifier::Mod_Alt))
if (modifiers & (KeyModifier::Mod_Ctrl | KeyModifier::Mod_Alt | KeyModifier::Mod_Super))
return true;
// FIXME: There are probably also keys with non-zero code points that should be filtered out.