]> git.gir.st - sendHID.git/blob - scancodes.h
initial code import
[sendHID.git] / scancodes.h
1 #ifndef __SCANCODES_H__
2 #define __SCANCODES_H__
3
4 #define UTF8_MAX_LENGTH 4
5
6 struct layout {
7 unsigned short key; //scancode of normal key
8 //if this is NULL, the key does not exist in this layout.
9 unsigned short mod; //bitmask of modifier keys
10 short is_dead; //is dead key (needs to be pressed twice)
11 };
12 struct keysym {
13 char sym [UTF8_MAX_LENGTH]; //utf-8 encoded key symbol
14 struct layout en_us; //substructure for this layout
15 struct layout de_at;
16 long int unicode; //the unicode number to send via alt+numpad or ^U if char is not available in a keyboard layout
17 };
18
19 struct keysym* toscan (const char* utf8);//returns the layout struct of a keysym
20 #endif
Imprint / Impressum