From b362913fc72d697fefb26d2aeef0b2a739f1a37a Mon Sep 17 00:00:00 2001 From: Michael Zabka Date: Sun, 3 Jan 2021 16:59:23 +0000 Subject: [PATCH] Add more event key modifiers for capslock, numlock & mode switch + ISO level 3 shift * They are not directly used but should be here to allow user use them --- event/key/key.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/event/key/key.go b/event/key/key.go index d70f1c343..74fbe1afd 100644 --- a/event/key/key.go +++ b/event/key/key.go @@ -78,6 +78,13 @@ const ( ModControl Modifiers = 1 << 1 ModAlt Modifiers = 1 << 2 ModMeta Modifiers = 1 << 3 // called "Command" on OS X + + // CapsLock & NumLock is not a part of standard modifiers but has to be here to support all keyboard layouts + ModCapsLock Modifiers = 1 << 4 + ModNumLock Modifiers = 1 << 5 + ModModeSwitch Modifiers = 1 << 6 // Currently experimental. See https://wiki.archlinux.org/index.php/X_keyboard_extension + ModLevel3Shift Modifiers = 1 << 7 // Currently experimental. See https://wiki.archlinux.org/index.php/X_keyboard_extension + ) // Code is the identity of a key relative to a notional "standard" keyboard.