diff options
author | jsorg71 <jsorg71> | 2009-08-12 02:13:29 +0000 |
---|---|---|
committer | jsorg71 <jsorg71> | 2009-08-12 02:13:29 +0000 |
commit | 4369219ae305d3616ae65691bfd1fda787ed5281 (patch) | |
tree | 985ccd8d035c40b4ab000e9c1f6c52c476b6d3c1 /xrdp/lang.c | |
parent | 85ae1cd27e76204b0a196d9a8dab3d5262a3bb9a (diff) | |
download | xrdp-proprietary-4369219ae305d3616ae65691bfd1fda787ed5281.tar.gz xrdp-proprietary-4369219ae305d3616ae65691bfd1fda787ed5281.zip |
keymap changes
Diffstat (limited to 'xrdp/lang.c')
-rw-r--r-- | xrdp/lang.c | 1186 |
1 files changed, 107 insertions, 1079 deletions
diff --git a/xrdp/lang.c b/xrdp/lang.c index c0c51311..256619a2 100644 --- a/xrdp/lang.c +++ b/xrdp/lang.c @@ -23,1042 +23,138 @@ #include "xrdp.h" -/*****************************************************************************/ -/* us english 0x409 */ - -/* non shift chars */ -int en_us_noshift[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '-', '=', 0, 0, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', '[', ']', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', - '\'', '`', 0, '\\', 'z', 'x', 'c', 'v', - 'b', 'n', 'm', ',', '.', '/', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '\\', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift chars */ -int en_us_shift[] = -{ - 0, 0, '!', '@', '#', '$', '%', '^', - '&', '*', '(', ')', '_', '+', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', '{', '}', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', - '"', '~', 0, '|', 'Z', 'X', 'C', 'V', - 'B', 'N', 'M', '<', '>', '?', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '|', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* right alt chars */ -int en_us_altgr[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* caps lock chars */ -int en_us_capslock[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '-', '=', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', '[', ']', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', ';', - '\'', '`', 0, '\\', 'Z', 'X', 'C', 'V', - 'B', 'N', 'M', ',', '.', '/', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '\\', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift caps lock chars */ -int en_us_shiftcapslock[] = -{ - 0, 0, '!', '@', '#', '$', '%', '^', - '&', '*', '(', ')', '_', '+', 0, 0, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', '{', '}', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', ':', - '"', '~', 0, '|', 'z', 'x', 'c', 'v', - 'b', 'n', 'm', '<', '>', '?', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '|', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/*****************************************************************************/ -/* italy 0x410 */ - -/* non shift chars */ -int it_noshift[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '\'', 0xec, 0, 0, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', 0xe8, '+', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0xf2, - 0xe0, '\\', 0, 0xf9, 'z', 'x', 'c', 'v', - 'b', 'n', 'm', ',', '.', '-', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '<', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift chars */ -int it_shift[] = -{ - 0, 0, '!', '"', 0xa3, '$', '%', '&', - '/', '(', ')', '=', '?', '^', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', 0xe9, '*', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0xe7, - 0xb0, '|', 0, 0xa7, 'Z', 'X', 'C', 'V', - 'B', 'N', 'M', ';', ':', '_', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '>', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* right alt chars */ -int it_altgr[] = -{ - 0, 0, 0, 0, 0, 0, 0x20ac, 0, - '{', 0, 0, '}', 0x60, '~', 0, 0, - 0, 0, 0x20ac, 0, 0, 0, 0, 0, - 0, 0, '[', ']', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '@', - '#', 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int it_capslock[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '\'', 0xec, 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', 0xe8, '+', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0xf2, - 0xe0, '\\', 0, 0xf9, 'Z', 'X', 'C', 'V', - 'B', 'N', 'M', ',', '.', '-', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '<', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int it_shiftcapslock[] = -{ - 0, 0, '!', '"', 0xa3, '$', '%', '&', - '/', '(', ')', '=', '?', '^', 0, 0, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', 0xe9, '*', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0xe7, - 0xb0, '|', 0, 0xa7, 'z', 'x', 'c', 'v', - 'b', 'n', 'm', ';', ':', '_', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '>', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/*****************************************************************************/ -/* Portuguese (Brazil) 0x416 */ - -/* non shift chars */ -int pt_br_noshift[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '-', '=', 0, 0, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', 0xb4, '[', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0xe7, - '~', '`', 0, ']', 'z', 'x', 'c', 'v', - 'b', 'n', 'm', ',', '.', ';', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '\\', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift chars */ -int pt_br_shift[] = -{ - 0, 0, '!', '@', '#', '$', '%', 0xa8, - '&', '*', '(', ')', '_', '+', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', '`', '{', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0xc7, - '^', '"', 0, '}', 'Z', 'X', 'C', 'V', - 'B', 'N', 'M', '<', '>', ':', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '|', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* right alt chars */ -int pt_br_altgr[] = -{ - 0, 0, 0xb9, 0xb2, 0xb3, 0xa3, 0xa2, 0xac, - 0, 0, 0, 0, 0, 0xa7, 0, 0, - '/', '?', 0xb0, 0, 0, 0, 0, 0, - 0, 0, 0, 0xaa, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0xba, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int pt_br_capslock[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '-', '=', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', 0xb4, '[', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0xc7, - '~', '`', 0, ']', 'Z', 'X', 'C', 'V', - 'B', 'N', 'M', ',', '.', ';', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '\\', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int pt_br_shiftcapslock[] = -{ - 0, 0, '!', '@', '#', '$', '%', 0xa8, - '&', '*', '(', ')', '_', '+', 0, 0, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', '`', '{', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0xe7, - '^', '"', 0, '}', 'z', 'x', 'c', 'v', - 'b', 'n', 'm', '<', '>', ':', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '|', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 +struct codepair +{ + tui8 code1; + tui8 code2; +}; +static struct codepair g_map[] = +{ + { 0, 0 }, { 9, 0 }, { 10, 0 }, { 11, 0 }, { 12, 0 }, /* 0 - 4 */ + { 13, 0 }, { 14, 0 }, { 15, 0 }, { 16, 0 }, { 17, 0 }, /* 5 - 9 */ + { 18, 0 }, { 19, 0 }, { 20, 0 }, { 21, 0 }, { 22, 0 }, /* 10 - 14 */ + { 23, 0 }, { 24, 0 }, { 25, 0 }, { 26, 0 }, { 27, 0 }, /* 15 - 19 */ + { 28, 0 }, { 29, 0 }, { 30, 0 }, { 31, 0 }, { 32, 0 }, /* 20 - 24 */ + { 33, 0 }, { 34, 0 }, { 35, 0 }, { 36, 108 }, { 37, 109 }, /* 25 - 29 */ + { 38, 0 }, { 39, 0 }, { 40, 0 }, { 41, 0 }, { 42, 0 }, /* 30 - 34 */ + { 43, 0 }, { 44, 0 }, { 45, 0 }, { 46, 0 }, { 47, 0 }, /* 35 - 39 */ + { 48, 0 }, { 49, 0 }, { 50, 0 }, { 51, 0 }, { 52, 0 }, /* 40 - 44 */ + { 53, 0 }, { 54, 0 }, { 55, 0 }, { 56, 0 }, { 57, 0 }, /* 45 - 49 */ + { 58, 0 }, { 59, 0 }, { 60, 0 }, { 61, 112 }, { 62, 0 }, /* 50 - 54 */ + { 63, 111 }, { 64, 113 }, { 65, 0 }, { 66, 0 }, { 67, 0 }, /* 55 - 59 */ + { 68, 0 }, { 69, 0 }, { 70, 0 }, { 71, 0 }, { 72, 0 }, /* 60 - 64 */ + { 73, 0 }, { 74, 0 }, { 75, 0 }, { 76, 0 }, { 77, 0 }, /* 65 - 69 */ + { 78, 0 }, { 79, 97 }, { 80, 98 }, { 81, 99 }, { 82, 0 }, /* 70 - 74 */ + { 83, 100 }, { 84, 0 }, { 85, 102 }, { 86, 0 }, { 87, 103 }, /* 75 - 79 */ + { 88, 104 }, { 89, 105 }, { 90, 106 }, { 91, 107 }, { 92, 0 }, /* 80 - 84 */ + { 93, 0 }, { 94, 0 }, { 95, 0 }, { 96, 0 }, { 97, 0 }, /* 85 - 89 */ + { 98, 0 }, { 0, 115 }, { 0, 116 }, { 0, 117 }, { 102, 0 }, /* 90 - 94 */ + { 103, 0 }, { 104, 0 }, { 105, 0 }, { 106, 0 }, { 107, 0 }, /* 95 - 99 */ + { 108, 0 }, { 109, 0 }, { 110, 0 }, { 111, 0 }, { 112, 0 }, /* 100 - 104 */ }; /*****************************************************************************/ -/* uk english 0x809 */ - -/* non shift chars */ -int en_uk_noshift[] = +struct xrdp_key_info* APP_CC +get_key_info_from_scan_code(int device_flags, int scan_code, int* keys, + int caps_lock, int num_lock, int scroll_lock, + struct xrdp_keymap* keymap) { - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '-', '=', 0, 0, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', '[', ']', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', ';', - '\'', '`', 0, '#', 'z', 'x', 'c', 'v', - 'b', 'n', 'm', ',', '.', '/', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '\\', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift chars */ -int en_uk_shift[] = -{ - 0, 0, '!', '"', 0xa3, '$', '%', '^', - '&', '*', '(', ')', '_', '+', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', '{', '}', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', ':', - '@', 0xac, 0, '~', 'Z', 'X', 'C', 'V', - 'B', 'N', 'M', '<', '>', '?', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '|', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* right alt chars */ -int en_uk_altgr[] = -{ - 0, 0, 0, 0, 0, 0x20ac, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0xe9, 0, 0, 0, 0xfa, 0xed, - 0xf3, 0, 0, 0, 0, 0, 0xe1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0xa6, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0xa6, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int en_uk_capslock[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '-', '=', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', '[', ']', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', ';', - '\'', 0xac, 0, '#', 'Z', 'X', 'C', 'V', - 'B', 'N', 'M', ',', '.', '/', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '\\', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int en_uk_shiftcapslock[] = -{ - 0, 0, '!', '"', 0xa3, '$', '%', '^', - '&', '*', '(', ')', '_', '+', 0, 0, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', '{', '}', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', ':', - '@', '`', 0, '~', 'z', 'x', 'c', 'v', - 'b', 'n', 'm', '<', '>', '?', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '|', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/*****************************************************************************/ -/* german 0x407 */ - -/* non shift chars */ -int de_noshift[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', 0xdf, 0xb4, 0, 0, - 'q', 'w', 'e', 'r', 't', 'z', 'u', 'i', - 'o', 'p', 0xfc, '+', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0xf6, - 0xe4, '^', 0, '#', 'y', 'x', 'c', 'v', - 'b', 'n', 'm', ',', '.', '-', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift chars */ -int de_shift[] = -{ - 0, 0, '!', '"', 0xa7, '$', '%', '&', - '/', '(', ')', '=', '?', '`', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Z', 'U', 'I', - 'O', 'P', 0xdc, '*', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0xd6, - 0xc4, 0xb0, 0, '\'', 'Y', 'X', 'C', 'V', - 'B', 'N', 'M', ';', ':', '_', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* right alt chars */ -int de_altgr[] = -{ - 0, 0, 0, 0xb2, 0xb3, 0, 0, 0, - '{', '[', ']', '}', '\\', 0, 0, 0, - '@', 0, 0x20ac, 0, 0, 0, 0, 0, - 0, 0, 0, '~', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0xb5, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int de_capslock[] = -{ - 0, 0, '!', '"', 0xa7, '$', '%', '&', - '/', '(', ')', '=', '?', '`', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Z', 'U', 'I', - 'O', 'P', 0xdc, '*', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0xd6, - 0xc4, 0xb0, 0, '\'', 'Y', 'X', 'C', 'V', - 'B', 'N', 'M', ';', ':', '_', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int de_shiftcapslock[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', 0xdf, 0xb4, 0, 0, - 'q', 'w', 'e', 'r', 't', 'z', 'u', 'i', - 'o', 'p', 0xfc, '+', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0xf6, - 0xe4, '^', 0, '#', 'y', 'x', 'c', 'v', - 'b', 'n', 'm', ',', '.', '-', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/*****************************************************************************/ -/* french 0x40c */ - -/* non shift chars */ -int fr_noshift[] = -{ - 0, 0, '&', 0xe9, '"', '\'', '(', '-', - 0xe8, '_', 0xe7, 0xe0, ')', '=', 0, 0, - 'a', 'z', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', '^', '$', 0, 0, 'q', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', - 0xf9, 0xb2, 0, '*', 'w', 'x', 'c', 'v', - 'b', 'n', ',', ';', ':', '!', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift chars */ -int fr_shift[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', 0xb0, '+', 0, 0, - 'A', 'Z', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', 0xa8, 0xa3, 0, 0, 'Q', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', 'M', - '%', '~', 0, 0xb5, 'W', 'X', 'C', 'V', - 'B', 'N', '?', '.', '/', 0xa7, 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* right alt chars */ -int fr_altgr[] = -{ - 0, 0, 0, '~', '#', '{', '[', '|', - '`', '\\', '^', '@', ']', '}', 0, 0, - 0, 0, 0x20ac, 0, 0, 0, 0, 0, - 0, 0, 0, 0xa4, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int fr_capslock[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int fr_shiftcapslock[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/*****************************************************************************/ -/* swedish 0x41d */ - -/* non shift chars */ -int se_noshift[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '+', 0xb4, 0, 0, - 'q', 'w', 'e', 'r', 't', 'y', 'u', 'i', - 'o', 'p', 0xe5, 0x22, 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0xf6, - 0xe4, 0xa7, 0, '\'', 'z', 'x', 'c', 'v', - 'b', 'n', 'm', ',', '.', '-', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '<', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift chars */ -int se_shift[] = -{ - 0, 0, '!', '"', '#', 0xa4, '%', '&', - '/', '(', ')', '=', '?', '`', 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Y', 'U', 'I', - 'O', 'P', 0xc5, 0x5e, 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', 0xd6, - 0xc4, 0xbd, 0, '*', 'Z', 'X', 'C', 'V', - 'B', 'N', 'M', ';', ':', '_', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, '>', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* right alt chars */ -int se_altgr[] = -{ - 0, 0, 0, '@', 0xa3, '$', 0, 0, - '{', '[', ']', '}', '\\', 0, 0, 0, - '@', 0, 0x20ac, 0, 0, 0, 0, 0, - 0, 0, 0, '~', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0xb5, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, '$', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, '|', 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int se_capslock[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int se_shiftcapslock[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/*****************************************************************************/ -/* czech 0x405 */ - -/* non shift chars */ -int cs_noshift[] = -{ - 0, 0, '+', 0x11b, 0x161, 0x10d, 0x159, 0x17e, - 0xfd, 0xe1, 0xed, 0xe9, '=', 0xb4, 0, 0, - 'q', 'w', 'e', 'r', 't', 'z', 'u', 'i', - 'o', 'p', 0xfa, ')', 0, 0, 'a', 's', - 'd', 'f', 'g', 'h', 'j', 'k', 'l', 0x16f, - 0xa7, ';', 0, 0xa8, 'y', 'x', 'c', 'v', - 'b', 'n', 'm', ',', '.', '-', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift chars */ -int cs_shift[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '%', 0x2c7, 0, 0, - 'Q', 'W', 'E', 'R', 'T', 'Z', 'U', 'I', - 'O', 'P', '/', '(', 0, 0, 'A', 'S', - 'D', 'F', 'G', 'H', 'J', 'K', 'L', '"', - '!', 0xb0, 0, 0x2c7, 'Y', 'X', 'C', 'V', - 'B', 'N', 'M', '?', ':', '_', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* right alt chars */ -int cs_altgr[] = -{ - 0, 0, '~', 0x2c7, '^', 0x2d8, 0xb0, 0x2db, - '`', 0xb7, 0xb4, 0x2dd, 0xa8, 0xb8, 0, 0, - '\\', '|', 0x20ac, 0, 0, 0, 0, 0, - 0, 0, 0xf7, 0xd7, 0, 0, 0, 0x111, - 0x110, '[', ']', 0, 0, 0x142, 0x141, '$', - 0xdf, 0, 0, 0, 0, '#', '&', '@', - '{', '}', 0, '<', '>', '*', 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int cs_capslock[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int cs_shiftcapslock[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/*****************************************************************************/ -/* russian 0x419 */ - -/* non shift chars */ -int ru_noshift[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '-', '=', 0, 0, - 0x439, 0x446, 0x443, 0x43a, 0x435, 0x43d, 0x433, 0x448, - 0x449, 0x437, 0x445, 0x44a, 0, 0, 0x444, 0x44b, - 0x432, 0x430, 0x43f, 0x440, 0x43e, 0x43b, 0x434, 0x436, - 0x44d, 0x451, 0, '\\', 0x44f, 0x447, 0x441, 0x43c, - 0x438, 0x442, 0x44c, 0x431, 0x44e, '.', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* shift chars */ -int ru_shift[] = -{ - 0, 0, '!', '"', 0x2116, ';', '%', ':', - '?', '*', '(', ')', '_', '+', 0, 0, - 0x419, 0x426, 0x423, 0x41a, 0x415, 0x41d, 0x413, 0x428, - 0x429, 0x417, 0x425, 0x42a, 0, 0, 0x424, 0x42b, - 0x412, 0x410, 0x41f, 0x420, 0x41e, 0x41b, 0x414, 0x416, - 0x42d, 0x401, 0, '/', 0x42f, 0x427, 0x421, 0x41c, - 0x418, 0x422, 0x42c, 0x411, 0x42e, ',', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/* right alt chars */ -int ru_altgr[] = -{ - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int ru_capslock[] = -{ - 0, 0, '1', '2', '3', '4', '5', '6', - '7', '8', '9', '0', '-', '=', 0, 0, - 0x419, 0x426, 0x423, 0x41a, 0x415, 0x41d, 0x413, 0x428, - 0x429, 0x417, 0x425, 0x42a, 0, 0, 0x424, 0x42b, - 0x412, 0x410, 0x41f, 0x420, 0x41e, 0x41b, 0x414, 0x416, - 0x42d, 0x401, 0, '\\', 0x42f, 0x427, 0x421, 0x41c, - 0x418, 0x422, 0x42c, 0x411, 0x42e, '.', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -int ru_shiftcapslock[] = -{ - 0, 0, '!', '"', 0x2116, ';', '%', ':', - '?', '*', '(', ')', '_', '+', 0, 0, - 0x439, 0x446, 0x443, 0x43a, 0x435, 0x43d, 0x433, 0x448, - 0x449, 0x437, 0x445, 0x44a, 0, 0, 0x444, 0x44b, - 0x432, 0x430, 0x43f, 0x440, 0x43e, 0x43b, 0x434, 0x436, - 0x44d, 0x451, 0, '/', 0x44f, 0x447, 0x441, 0x43c, - 0x438, 0x442, 0x44c, 0x431, 0x44e, ',', 0, '*', - 0, ' ', 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, '7', - '8', '9', '-', '4', '5', '6', '+', '1', - '2', '3', '0', '.', 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0 -}; - -/*****************************************************************************/ -twchar APP_CC -get_char_from_scan_code(int device_flags, int scan_code, int* keys, - int caps_lock, int num_lock, int scroll_lock, - struct xrdp_keymap* keymap) -{ - int rv; + struct xrdp_key_info* rv; int shift; int altgr; int ext; + int index; - /*g_writeln("%d %d", scan_code, device_flags);*/ + ext = device_flags & 0x0100; shift = keys[42] || keys[54]; altgr = keys[56]; /* right alt */ - ext = device_flags & 0x0100; rv = 0; - if (scan_code >= 128) + scan_code = scan_code % 128; + index = 0; + if (scan_code <= (sizeof(g_map) / sizeof(g_map[0]))) { - scan_code = scan_code % 128; - num_lock = 0; + index = ext ? g_map[scan_code].code2 : g_map[scan_code].code1; } - if (!num_lock) + /* keymap file is created with numlock off so we have to do this */ + if ((index >= 79) && (index <= 91)) { - switch (scan_code) - { - case 71: /* 7 */ - case 72: /* 8 */ - case 73: /* 9 */ - case 75: /* 4 */ - case 76: /* 5 */ - case 77: /* 6 */ - case 79: /* 1 */ - case 80: /* 2 */ - case 81: /* 3 */ - case 82: /* 0 */ - case 83: /* . */ - return (twchar)rv; - } + if (num_lock) + { + rv = &(keymap->keys_shift[index]); + } + else + { + rv = &(keymap->keys_noshift[index]); + } } - if (ext) + else if (shift && caps_lock) { - if (scan_code == 53) - { - rv = '/'; - } + rv = &(keymap->keys_shiftcapslock[index]); + } + else if (shift) + { + rv = &(keymap->keys_shift[index]); + } + else if (caps_lock) + { + rv = &(keymap->keys_capslock[index]); + } + else if (altgr) + { + rv = &(keymap->keys_altgr[index]); } else { - if (shift && caps_lock) - { - rv = keymap->keys_shiftcapslock[scan_code]; - } - else if (shift) - { - rv = keymap->keys_shift[scan_code]; - } - else if (caps_lock) - { - rv = keymap->keys_capslock[scan_code]; - } - else if (altgr) - { - rv = keymap->keys_altgr[scan_code]; - } - else - { - rv = keymap->keys_noshift[scan_code]; - } + rv = &(keymap->keys_noshift[index]); } - return (twchar)rv; + return rv; +} + +/*****************************************************************************/ +int APP_CC +get_keysym_from_scan_code(int device_flags, int scan_code, int* keys, + int caps_lock, int num_lock, int scroll_lock, + struct xrdp_keymap* keymap) +{ + struct xrdp_key_info* ki; + + ki = get_key_info_from_scan_code(device_flags, scan_code, keys, + caps_lock, num_lock, scroll_lock, + keymap); + if (ki == 0) + { + return 0; + } + return ki->sym; +} + +/*****************************************************************************/ +twchar APP_CC +get_char_from_scan_code(int device_flags, int scan_code, int* keys, + int caps_lock, int num_lock, int scroll_lock, + struct xrdp_keymap* keymap) +{ + struct xrdp_key_info* ki; + + ki = get_key_info_from_scan_code(device_flags, scan_code, keys, + caps_lock, num_lock, scroll_lock, + keymap); + if (ki == 0) + { + return 0; + } + return (twchar)(ki->chr); } /*****************************************************************************/ static int APP_CC -km_read_section(int fd, const char* section_name, int* keymap) +km_read_section(int fd, const char* section_name, struct xrdp_key_info* keymap) { struct list* names; struct list* values; int index; int code; + int pos1; char* name; char* value; @@ -1084,14 +180,12 @@ km_read_section(int fd, const char* section_name, int* keymap) } if ((code >= 0) && (code < 128)) { - if (g_strncasecmp(value, "0x", 2) == 0) - { - keymap[code] = g_htoi(value + 2); - } - else + pos1 = g_pos(value, ":"); + if (pos1 >= 0) { - keymap[code] = g_atoi(value); + keymap[code].chr = g_atoi(value + pos1 + 1); } + keymap[code].sym = g_atoi(value); } } } @@ -1111,72 +205,6 @@ get_keymaps(int keylayout, struct xrdp_keymap* keymap) struct xrdp_keymap lkeymap; ks = sizeof(int) * 128; - switch (keylayout) - { - case 0x40c: /* france */ - g_memcpy(keymap->keys_noshift, fr_noshift, ks); - g_memcpy(keymap->keys_shift, fr_shift, ks); - g_memcpy(keymap->keys_altgr, fr_altgr, ks); - g_memcpy(keymap->keys_capslock, fr_capslock, ks); - g_memcpy(keymap->keys_shiftcapslock, fr_shiftcapslock, ks); - break; - case 0x809: /* en-uk or en-gb */ - g_memcpy(keymap->keys_noshift, en_uk_noshift, ks); - g_memcpy(keymap->keys_shift, en_uk_shift, ks); - g_memcpy(keymap->keys_altgr, en_uk_altgr, ks); - g_memcpy(keymap->keys_capslock, en_uk_capslock, ks); - g_memcpy(keymap->keys_shiftcapslock, en_uk_shiftcapslock, ks); - break; - case 0x407: /* german */ - g_memcpy(keymap->keys_noshift, de_noshift, ks); - g_memcpy(keymap->keys_shift, de_shift, ks); - g_memcpy(keymap->keys_altgr, de_altgr, ks); - g_memcpy(keymap->keys_capslock, de_capslock, ks); - g_memcpy(keymap->keys_shiftcapslock, de_shiftcapslock, ks); - break; - case 0x416: /* Portuguese (Brazil) */ - g_memcpy(keymap->keys_noshift, pt_br_noshift, ks); - g_memcpy(keymap->keys_shift, pt_br_shift, ks); - g_memcpy(keymap->keys_altgr, pt_br_altgr, ks); - g_memcpy(keymap->keys_capslock, pt_br_capslock, ks); - g_memcpy(keymap->keys_shiftcapslock, pt_br_shiftcapslock, ks); - break; - case 0x410: /* italy */ - g_memcpy(keymap->keys_noshift, it_noshift, ks); - g_memcpy(keymap->keys_shift, it_shift, ks); - g_memcpy(keymap->keys_altgr, it_altgr, ks); - g_memcpy(keymap->keys_capslock, it_capslock, ks); - g_memcpy(keymap->keys_shiftcapslock, it_shiftcapslock, ks); - break; - case 0x41d: /* swedish */ - g_memcpy(keymap->keys_noshift, se_noshift, ks); - g_memcpy(keymap->keys_shift, se_shift, ks); - g_memcpy(keymap->keys_altgr, se_altgr, ks); - g_memcpy(keymap->keys_capslock, se_capslock, ks); - g_memcpy(keymap->keys_shiftcapslock, se_shiftcapslock, ks); - break; - case 0x405: /* czech */ - g_memcpy(keymap->keys_noshift, cs_noshift, ks); - g_memcpy(keymap->keys_shift, cs_shift, ks); - g_memcpy(keymap->keys_altgr, cs_altgr, ks); - g_memcpy(keymap->keys_capslock, cs_capslock, ks); - g_memcpy(keymap->keys_shiftcapslock, cs_shiftcapslock, ks); - break; - case 0x419: /* russian */ - g_memcpy(keymap->keys_noshift, ru_noshift, ks); - g_memcpy(keymap->keys_shift, ru_shift, ks); - g_memcpy(keymap->keys_altgr, ru_altgr, ks); - g_memcpy(keymap->keys_capslock, ru_capslock, ks); - g_memcpy(keymap->keys_shiftcapslock, ru_shiftcapslock, ks); - break; - default: /* default 0x409 us en */ - g_memcpy(keymap->keys_noshift, en_us_noshift, ks); - g_memcpy(keymap->keys_shift, en_us_shift, ks); - g_memcpy(keymap->keys_altgr, en_us_altgr, ks); - g_memcpy(keymap->keys_capslock, en_us_capslock, ks); - g_memcpy(keymap->keys_shiftcapslock, en_us_shiftcapslock, ks); - break; - } /* check if there is a keymap file */ g_snprintf(filename, 255, "%s/km-%4.4x.ini", XRDP_CFG_PATH, keylayout); if (g_file_exist(filename)) |