From feecf89d65b3f76a4fe090daa01928439efb9fce Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Thu, 5 Sep 2024 12:29:26 -0400 Subject: [PATCH] LibWeb: Define a helper constant for the platform word-jumping key On Linux/Windows, the ctrl key is used in conjunction with arrow keys to jump word-by-word in text documents. On macOS, the option key is used (which is mapped to the alt key code). --- Userland/Libraries/LibWeb/UIEvents/KeyCode.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Userland/Libraries/LibWeb/UIEvents/KeyCode.h b/Userland/Libraries/LibWeb/UIEvents/KeyCode.h index 71f41025e04..094de5cf571 100644 --- a/Userland/Libraries/LibWeb/UIEvents/KeyCode.h +++ b/Userland/Libraries/LibWeb/UIEvents/KeyCode.h @@ -185,8 +185,10 @@ enum KeyModifier { #if defined(AK_OS_MACOS) Mod_PlatformCtrl = Mod_Super, + Mod_PlatformWordJump = Mod_Alt, #else Mod_PlatformCtrl = Mod_Ctrl, + Mod_PlatformWordJump = Mod_Ctrl, #endif };