From 6784bb312f8cea2104b39adde1cce8246114e415 Mon Sep 17 00:00:00 2001 From: Quentin Dreyer Date: Tue, 22 Dec 2020 10:50:23 +0100 Subject: chore: sync with W3C documentation https://www.w3.org/TR/uievents-key/ --- core/input/domkeytable.js | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/core/input/domkeytable.js b/core/input/domkeytable.js index 1b6baa6..f79aead 100644 --- a/core/input/domkeytable.js +++ b/core/input/domkeytable.js @@ -35,7 +35,7 @@ function addNumpad(key, standard, numpad) { DOMKeyTable[key] = [standard, standard, standard, numpad]; } -// 2.2. Modifier Keys +// 3.2. Modifier Keys addLeftRight("Alt", KeyTable.XK_Alt_L, KeyTable.XK_Alt_R); addStandard("AltGraph", KeyTable.XK_ISO_Level3_Shift); @@ -49,25 +49,27 @@ addStandard("ScrollLock", KeyTable.XK_Scroll_Lock); addLeftRight("Shift", KeyTable.XK_Shift_L, KeyTable.XK_Shift_R); // - Symbol // - SymbolLock +// - Hyper +// - Super -// 2.3. Whitespace Keys +// 3.3. Whitespace Keys addNumpad("Enter", KeyTable.XK_Return, KeyTable.XK_KP_Enter); addStandard("Tab", KeyTable.XK_Tab); addNumpad(" ", KeyTable.XK_space, KeyTable.XK_KP_Space); -// 2.4. Navigation Keys +// 3.4. Navigation Keys addNumpad("ArrowDown", KeyTable.XK_Down, KeyTable.XK_KP_Down); -addNumpad("ArrowUp", KeyTable.XK_Up, KeyTable.XK_KP_Up); addNumpad("ArrowLeft", KeyTable.XK_Left, KeyTable.XK_KP_Left); addNumpad("ArrowRight", KeyTable.XK_Right, KeyTable.XK_KP_Right); +addNumpad("ArrowUp", KeyTable.XK_Up, KeyTable.XK_KP_Up); addNumpad("End", KeyTable.XK_End, KeyTable.XK_KP_End); addNumpad("Home", KeyTable.XK_Home, KeyTable.XK_KP_Home); addNumpad("PageDown", KeyTable.XK_Next, KeyTable.XK_KP_Next); addNumpad("PageUp", KeyTable.XK_Prior, KeyTable.XK_KP_Prior); -// 2.5. Editing Keys +// 3.5. Editing Keys addStandard("Backspace", KeyTable.XK_BackSpace); // Browsers send "Clear" for the numpad 5 without NumLock because @@ -85,7 +87,7 @@ addStandard("Paste", KeyTable.XF86XK_Paste); addStandard("Redo", KeyTable.XK_Redo); addStandard("Undo", KeyTable.XK_Undo); -// 2.6. UI Keys +// 3.6. UI Keys // - Accept // - Again (could just be XK_Redo) @@ -103,7 +105,7 @@ addStandard("Select", KeyTable.XK_Select); addStandard("ZoomIn", KeyTable.XF86XK_ZoomIn); addStandard("ZoomOut", KeyTable.XF86XK_ZoomOut); -// 2.7. Device Keys +// 3.7. Device Keys addStandard("BrightnessDown", KeyTable.XF86XK_MonBrightnessDown); addStandard("BrightnessUp", KeyTable.XF86XK_MonBrightnessUp); @@ -116,7 +118,7 @@ addStandard("Hibernate", KeyTable.XF86XK_Hibernate); addStandard("Standby", KeyTable.XF86XK_Standby); addStandard("WakeUp", KeyTable.XF86XK_WakeUp); -// 2.8. IME and Composition Keys +// 3.8. IME and Composition Keys addStandard("AllCandidates", KeyTable.XK_MultipleCandidate); addStandard("Alphanumeric", KeyTable.XK_Eisu_toggle); @@ -137,7 +139,7 @@ addStandard("PreviousCandidate", KeyTable.XK_PreviousCandidate); addStandard("SingleCandidate", KeyTable.XK_SingleCandidate); addStandard("HangulMode", KeyTable.XK_Hangul); addStandard("HanjaMode", KeyTable.XK_Hangul_Hanja); -addStandard("JunjuaMode", KeyTable.XK_Hangul_Jeonja); +addStandard("JunjaMode", KeyTable.XK_Hangul_Jeonja); addStandard("Eisu", KeyTable.XK_Eisu_toggle); addStandard("Hankaku", KeyTable.XK_Hankaku); addStandard("Hiragana", KeyTable.XK_Hiragana); @@ -149,7 +151,7 @@ addStandard("Romaji", KeyTable.XK_Romaji); addStandard("Zenkaku", KeyTable.XK_Zenkaku); addStandard("ZenkakuHankaku", KeyTable.XK_Zenkaku_Hankaku); -// 2.9. General-Purpose Function Keys +// 3.9. General-Purpose Function Keys addStandard("F1", KeyTable.XK_F1); addStandard("F2", KeyTable.XK_F2); @@ -188,7 +190,7 @@ addStandard("F34", KeyTable.XK_F34); addStandard("F35", KeyTable.XK_F35); // - Soft1... -// 2.10. Multimedia Keys +// 3.10. Multimedia Keys // - ChannelDown // - ChannelUp @@ -200,6 +202,7 @@ addStandard("MailSend", KeyTable.XF86XK_Send); addStandard("MediaFastForward", KeyTable.XF86XK_AudioForward); addStandard("MediaPause", KeyTable.XF86XK_AudioPause); addStandard("MediaPlay", KeyTable.XF86XK_AudioPlay); +// - MediaPlayPause addStandard("MediaRecord", KeyTable.XF86XK_AudioRecord); addStandard("MediaRewind", KeyTable.XF86XK_AudioRewind); addStandard("MediaStop", KeyTable.XF86XK_AudioStop); @@ -211,12 +214,12 @@ addStandard("Print", KeyTable.XK_Print); addStandard("Save", KeyTable.XF86XK_Save); addStandard("SpellCheck", KeyTable.XF86XK_Spell); -// 2.11. Multimedia Numpad Keys +// 3.11. Multimedia Numpad Keys // - Key11 // - Key12 -// 2.12. Audio Keys +// 3.12. Audio Keys // - AudioBalanceLeft // - AudioBalanceRight @@ -236,16 +239,17 @@ addStandard("AudioVolumeMute", KeyTable.XF86XK_AudioMute); // - MicrophoneVolumeUp addStandard("MicrophoneVolumeMute", KeyTable.XF86XK_AudioMicMute); -// 2.13. Speech Keys +// 3.13. Speech Keys // - SpeechCorrectionList // - SpeechInputToggle -// 2.14. Application Keys +// 3.14. Application Keys addStandard("LaunchApplication1", KeyTable.XF86XK_MyComputer); addStandard("LaunchApplication2", KeyTable.XF86XK_Calculator); addStandard("LaunchCalendar", KeyTable.XF86XK_Calendar); +// - LaunchContacts addStandard("LaunchMail", KeyTable.XF86XK_Mail); addStandard("LaunchMediaPlayer", KeyTable.XF86XK_AudioMedia); addStandard("LaunchMusicPlayer", KeyTable.XF86XK_Music); @@ -256,7 +260,7 @@ addStandard("LaunchWebBrowser", KeyTable.XF86XK_WWW); addStandard("LaunchWebCam", KeyTable.XF86XK_WebCam); addStandard("LaunchWordProcessor", KeyTable.XF86XK_Word); -// 2.15. Browser Keys +// 3.15. Browser Keys addStandard("BrowserBack", KeyTable.XF86XK_Back); addStandard("BrowserFavorites", KeyTable.XF86XK_Favorites); @@ -266,15 +270,15 @@ addStandard("BrowserRefresh", KeyTable.XF86XK_Refresh); addStandard("BrowserSearch", KeyTable.XF86XK_Search); addStandard("BrowserStop", KeyTable.XF86XK_Stop); -// 2.16. Mobile Phone Keys +// 3.16. Mobile Phone Keys // - A whole bunch... -// 2.17. TV Keys +// 3.17. TV Keys // - A whole bunch... -// 2.18. Media Controller Keys +// 3.18. Media Controller Keys // - A whole bunch... addStandard("Dimmer", KeyTable.XF86XK_BrightnessAdjust); -- cgit v1.2.1