Explorar o código

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.
Timothy Flynn hai 1 ano
pai
achega
4a476c3dd5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Userland/Libraries/LibWeb/Page/EventHandler.cpp

+ 1 - 1
Userland/Libraries/LibWeb/Page/EventHandler.cpp

@@ -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.