|
|
|
@ -1,22 +1,21 @@ |
|
|
|
static int columns[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; |
|
|
|
static int columns[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; |
|
|
|
static int rows[] = {14, 16, 17, 18, 19, 20, 21, 22, 26, 27}; |
|
|
|
static int rows[] = {14, 16, 17, 18, 19, 20, 21, 22, 26, 27, 13}; |
|
|
|
//1,4,5,7
|
|
|
|
//1,4,5,7
|
|
|
|
static int num_lock = 25; |
|
|
|
static int num_lock = 25; |
|
|
|
static int caps_lock = 11; |
|
|
|
static int caps_lock = 11; |
|
|
|
static int scroll_lock = 13; |
|
|
|
static int scroll_lock = 10; |
|
|
|
|
|
|
|
|
|
|
|
static char* mapping[sizeof(columns)/sizeof(int)][sizeof(rows)/sizeof(int)] = { |
|
|
|
static char* mapping[sizeof(columns)/sizeof(int)][sizeof(rows)/sizeof(int)] = { |
|
|
|
{"^", "--tab", "--caps-lock", "--left-shift", "--left-ctrl", "<", "a", "q", "1", "2"},//column 0
|
|
|
|
{"^", "w", "r", "h", ",", "-", "--application", "--kp-0", "--kp-enter", "--media4","--esc"}, |
|
|
|
{"w", "s", "y", "--left-meta", "--left-alt", "x", "d", "e", "3", "4"}, |
|
|
|
{"--tab", "s", "f", "b", "l", "ä", "--right-ctrl", "--kp-1", "--kp-plus", "--pause","--f1"}, |
|
|
|
{"r", "f", "c", "--spacebar", "v", "g", "t", "5", "6", "z"}, |
|
|
|
{"--caps-lock", "y", "c", "n", "o", "ü", "--left", "--kp-2", "--kp-minus", "--scrl-lck", "--f2"}, |
|
|
|
{"h", "b", "n", "j", "u", "7", "8", "i", "k", "m"}, |
|
|
|
{"--left-shift", "--left-meta", "--spacebar", "j", "9", "ß", "--down", "--kp-3", "--kp-mul", "--prtsc", "--f3"}, |
|
|
|
{",", "l", "o", "9", "0", "p", "ö", ".", "--right-alt", "--right-meta"}, |
|
|
|
{"--left-ctrl", "--left-alt", "v", "u", "0", "´", "--up", "--kp-4", "--kp-div", "--home", "--f4"}, |
|
|
|
{"-", "ä", "ü", "ß", "´", "--bckspc", "--return", "+", "#", "--right-shift"}, |
|
|
|
{"<", "x", "g", "7", "p", "--bckspc", "--right", "--kp-5", "--num-lock", "--insert", "--f5"}, |
|
|
|
{"--application", "--right-ctrl", "--f10", "--f11", "--f12", "0", "0", "0", "0", "0"}, |
|
|
|
{"a", "d", "t", "8", "ö", "--return", "--del", "--kp-6", "--kp-comma", /*extra key*/"h e l l o", "--f6"}, |
|
|
|
{"--left", "--down", "--right", "--up", "--del", "--end", "--pagedown", "--pageup", "--home", "--insert"}, |
|
|
|
{"q", "e", "5", "i", ".", "+", "--end", "--kp-7", "--media1", "--f12", "--f7"}, |
|
|
|
{"--kp-0", "--kp-1", "--kp-2", "--kp-3", "--kp-4", "--kp-5", "--kp-6", "--kp-7", "--kp-8", "--kp-9"}, |
|
|
|
{"1", "3", "6", "k", "--right-alt", "#", "--pagedown", "--kp-8", "--media2", "--f11", "--f8"}, |
|
|
|
{"--kp--enter", "--kp-plus", "--kp-minus", "--kp-mul", "--kp-div", "--num-lock", "0", "0", "0", "0"}, |
|
|
|
{"2", "4", "z", "m", "--right-meta", "--right-shift", "--pageup", "--kp-9", "--media3", "--f10", "--f9"} |
|
|
|
{"--esc", "--f1", "--f2", "--f3", "--f4", "--f5", "--f6", "--f7", "--f8", "--f9"}//column 10
|
|
|
|
|
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
struct options { |
|
|
|
struct options { |
|
|
|
@ -37,6 +36,11 @@ static struct options kmod[] = { |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
static struct options kval[] = { |
|
|
|
static struct options kval[] = { |
|
|
|
|
|
|
|
// {.opt = "--extra", .val = 0x7F},
|
|
|
|
|
|
|
|
// {.opt = "--media1", .val = 0x81}, Media keys are consumer HID not Keyboard HID
|
|
|
|
|
|
|
|
// {.opt = "--media2", .val = 0x80},
|
|
|
|
|
|
|
|
// {.opt = "--media3", .val = 0xCD},
|
|
|
|
|
|
|
|
// {.opt = "--media4", .val = 0xCE},
|
|
|
|
{.opt = "^", .val = 0x35}, |
|
|
|
{.opt = "^", .val = 0x35}, |
|
|
|
{.opt = "1", .val = 0x1E}, |
|
|
|
{.opt = "1", .val = 0x1E}, |
|
|
|
{.opt = "2", .val = 0x1F}, |
|
|
|
{.opt = "2", .val = 0x1F}, |
|
|
|
@ -58,7 +62,7 @@ static struct options kval[] = { |
|
|
|
{.opt = "r", .val = 0x15}, |
|
|
|
{.opt = "r", .val = 0x15}, |
|
|
|
{.opt = "t", .val = 0x17}, |
|
|
|
{.opt = "t", .val = 0x17}, |
|
|
|
{.opt = "z", .val = 0x1C}, |
|
|
|
{.opt = "z", .val = 0x1C}, |
|
|
|
{.opt = "u", .val = 0xA0}, |
|
|
|
{.opt = "u", .val = 0x18}, |
|
|
|
{.opt = "i", .val = 0x0C}, |
|
|
|
{.opt = "i", .val = 0x0C}, |
|
|
|
{.opt = "o", .val = 0x12}, |
|
|
|
{.opt = "o", .val = 0x12}, |
|
|
|
{.opt = "p", .val = 0x13}, |
|
|
|
{.opt = "p", .val = 0x13}, |
|
|
|
@ -80,14 +84,14 @@ static struct options kval[] = { |
|
|
|
{.opt = "--return", .val = 0x28}, |
|
|
|
{.opt = "--return", .val = 0x28}, |
|
|
|
{.opt = "<", .val = 0x64}, |
|
|
|
{.opt = "<", .val = 0x64}, |
|
|
|
{.opt = "y", .val = 0x1D}, |
|
|
|
{.opt = "y", .val = 0x1D}, |
|
|
|
{.opt = "x", .val = 0x2B}, |
|
|
|
{.opt = "x", .val = 0x1B}, |
|
|
|
{.opt = "c", .val = 0x06}, |
|
|
|
{.opt = "c", .val = 0x06}, |
|
|
|
{.opt = "v", .val = 0x19}, |
|
|
|
{.opt = "v", .val = 0x19}, |
|
|
|
{.opt = "b", .val = 0x05}, |
|
|
|
{.opt = "b", .val = 0x05}, |
|
|
|
{.opt = "n", .val = 0x11}, |
|
|
|
{.opt = "n", .val = 0x11}, |
|
|
|
{.opt = "m", .val = 0x10}, |
|
|
|
{.opt = "m", .val = 0x10}, |
|
|
|
{.opt = ",", .val = 0x36}, |
|
|
|
{.opt = ",", .val = 0x36}, |
|
|
|
{.opt = ".", .val = 0x17}, |
|
|
|
{.opt = ".", .val = 0x37}, |
|
|
|
{.opt = "-", .val = 0x38}, |
|
|
|
{.opt = "-", .val = 0x38}, |
|
|
|
{.opt = "--spacebar", .val = 0x2C}, |
|
|
|
{.opt = "--spacebar", .val = 0x2C}, |
|
|
|
{.opt = "--esc", .val = 0x29}, |
|
|
|
{.opt = "--esc", .val = 0x29}, |
|
|
|
@ -116,5 +120,23 @@ static struct options kval[] = { |
|
|
|
{.opt = "--application", .val = 0x65}, |
|
|
|
{.opt = "--application", .val = 0x65}, |
|
|
|
{.opt = "--num-lock", .val = 0x53}, |
|
|
|
{.opt = "--num-lock", .val = 0x53}, |
|
|
|
{.opt = "--kp-enter", .val = 0x58}, |
|
|
|
{.opt = "--kp-enter", .val = 0x58}, |
|
|
|
|
|
|
|
{.opt = "--kp-0", .val = 0x62}, |
|
|
|
|
|
|
|
{.opt = "--kp-1", .val = 0x59}, |
|
|
|
|
|
|
|
{.opt = "--kp-2", .val = 0x5A}, |
|
|
|
|
|
|
|
{.opt = "--kp-3", .val = 0x5B}, |
|
|
|
|
|
|
|
{.opt = "--kp-4", .val = 0x5C}, |
|
|
|
|
|
|
|
{.opt = "--kp-5", .val = 0x5D}, |
|
|
|
|
|
|
|
{.opt = "--kp-6", .val = 0x5E}, |
|
|
|
|
|
|
|
{.opt = "--kp-7", .val = 0x5F}, |
|
|
|
|
|
|
|
{.opt = "--kp-8", .val = 0x60}, |
|
|
|
|
|
|
|
{.opt = "--kp-9", .val = 0x61}, |
|
|
|
|
|
|
|
{.opt = "--kp-div", .val = 0x54}, |
|
|
|
|
|
|
|
{.opt = "--kp-mul", .val = 0x55}, |
|
|
|
|
|
|
|
{.opt = "--kp-minus", .val = 0x56}, |
|
|
|
|
|
|
|
{.opt = "--kp-plus", .val = 0x57}, |
|
|
|
|
|
|
|
{.opt = "--kp-comma", .val = 0x63}, |
|
|
|
|
|
|
|
{.opt = "--pause", .val = 0x48}, |
|
|
|
|
|
|
|
{.opt = "--scrl-lck", .val = 0x47}, |
|
|
|
|
|
|
|
{.opt = "--prtsc", .val = 0x46}, |
|
|
|
{.opt = NULL} |
|
|
|
{.opt = NULL} |
|
|
|
}; |
|
|
|
}; |
|
|
|
|