]>
git.gir.st - sendHID.git/blob - scancodes.h
1 #ifndef __SCANCODES_H__
2 #define __SCANCODES_H__
4 #define UTF8_MAX_LENGTH 4
8 #define MOD_LSHIFT 1<<1
10 #define MOD_LSUPER 1<<3
11 #define MOD_RCTRL 1<<4
12 #define MOD_RSHIFT 1<<5
14 #define MOD_RSUPER 1<<7
17 unsigned short key
; //scancode of normal key
18 //if this is NULL, the key does not exist in this layout.
19 unsigned short mod
; //bitmask of modifier keys
20 short is_dead
; //is dead key (needs to be pressed twice)
23 char sym
[UTF8_MAX_LENGTH
]; //utf-8 encoded key symbol
24 struct layout en_us
; //substructure for this layout
27 unsigned int unicode
; //the unicode number to send via alt+numpad or ^U if char is not available in a keyboard layout
30 struct keysym
* toscan (const char* utf8
);//returns the layout struct of a keysym