Skip to content

Commit b362913

Browse files
committed
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
1 parent e6ae53a commit b362913

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

event/key/key.go

+7
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ const (
7878
ModControl Modifiers = 1 << 1
7979
ModAlt Modifiers = 1 << 2
8080
ModMeta Modifiers = 1 << 3 // called "Command" on OS X
81+
82+
// CapsLock & NumLock is not a part of standard modifiers but has to be here to support all keyboard layouts
83+
ModCapsLock Modifiers = 1 << 4
84+
ModNumLock Modifiers = 1 << 5
85+
ModModeSwitch Modifiers = 1 << 6 // Currently experimental. See https://wiki.archlinux.org/index.php/X_keyboard_extension
86+
ModLevel3Shift Modifiers = 1 << 7 // Currently experimental. See https://wiki.archlinux.org/index.php/X_keyboard_extension
87+
8188
)
8289

8390
// Code is the identity of a key relative to a notional "standard" keyboard.

0 commit comments

Comments
 (0)