wchar_taltgr_keys[49]={0};// old, US don't use AltGr key: L"\0@\0$\0\0{[]}\\\0qwertyuiop\0~asdfghjkl\0\0\0\0zxcvbnm\0\0\0|"; // \0 on no symbol; as obtained by `loadkeys us`
constcharchar_or_func[]=// c = character key, f = function key, _ = blank/error ('_' is used, don't change); all according to KEY_* defines from <linux/input.h>
"_fccccccccccccff"
"ccccccccccccffcc"
"ccccccccccfccccc"
"ccccccffffffffff"
"ffffffffffffffff"
"ffff__cff_______"
"ffffffffffffffff"
"_______f_____fff";
#define N_KEYS_DEFINED 106 // sum of all 'c' and 'f' chars in char_or_func[]
inlineboolis_char_key(unsignedintcode)
{
assert(code<sizeof(char_or_func));
return(char_or_func[code]=='c');
}
inlineboolis_func_key(unsignedintcode)
{
assert(code<sizeof(char_or_func));
return(char_or_func[code]=='f');
}
inlineboolis_used_key(unsignedintcode)
{
assert(code<sizeof(char_or_func));
return(char_or_func[code]!='_');
}
// translates character keycodes to continuous array indices