]>
git.gir.st - sendHID.git/blob - scancodes.h
1 // (C) 2016 Tobias Girstmair, released under the GNU GPL
2 #ifndef __SCANCODES_H__
3 #define __SCANCODES_H__
5 #define UTF8_MAX_LENGTH 4
9 #define MOD_LSHIFT 1<<1
11 #define MOD_LSUPER 1<<3
12 #define MOD_RCTRL 1<<4
13 #define MOD_RSHIFT 1<<5
15 #define MOD_RSUPER 1<<7
18 unsigned short key
; //scancode of normal key
19 //if this is NULL, the key does not exist in this layout.
20 unsigned short mod
; //bitmask of modifier keys
21 short is_dead
; //is dead key (needs to be pressed twice)
24 char sym
[UTF8_MAX_LENGTH
]; //utf-8 encoded key symbol
25 struct layout en_us
; //substructure for this layout
28 unsigned int unicode
; //the unicode number to send via alt+numpad or ^U if char is not available in a keyboard layout
31 enum kbdl
{ //keyboard layouts:
35 de_ND
//de_AT-nodeadkeys
38 struct keysym
* toscan (const char* utf8
);//returns the layout struct of a keysym
39 struct layout
* tolay (struct keysym
* s
, enum kbdl layout
); //returns layout struct from keysym struct