dnl Recognized modifier names and their column numbers: dnl shift 1 dnl altgr 2 dnl control 4 dnl alt 8 dnl shiftl 16 dnl shiftr 32 dnl ctrll 64 dnl ctrlr 128 dnl Both shifts mapped to shift. dnl both controls mapped to control. dnl both alts mapped to alt dnl Caps Lock mapped to altgrlock dnl altgr contains dvorak version of everything. dnl things normally bound to AltGr are being rebound to Shift + Alt, unless duplicated dnl (normally in number keys altgr corresponds to "national shift".) dnl total of four modifiers: maps 0-15 dnl Bare Shift AltGr Shift+AltGr dnl alpha(code, qwerty, dvorak) keymaps 0-15 define(`toupper', `translit($1, `a-z', `A-Z')') define(`dvorak', `AltGr keycode $1 = $2 AltGr Shift keycode $1 = toupper($2) AltGr Control keycode $1 = Control_$2 AltGr Control Shift keycode $1 = Control_$2 AltGr Alt keycode $1 = Meta_$2 AltGr Shift Alt keycode $1 = Meta_`'toupper($2) AltGr Control Alt keycode $1 = Meta_Control_$2 AltGr Control Shift Alt keycode $1 = Meta_Control_$2') define(`qwerty', `plain keycode $1 = $2 Shift keycode $1 = toupper($2) Control keycode $1 = Control_$2 Control Shift keycode $1 = Control_$2 Alt keycode $1 = Meta_$2 Shift Alt keycode $1 = Meta_`'toupper($2) Control Alt keycode $1 = Meta_Control_$2 Control Shift Alt keycode $1 = Meta_Control_$2') define(`alpha', `keycode $1 = $2 toupper($2) $3 toupper($3) \ Control_$2 Control_$2 Control_$3 Control_$3 \ Meta_$2 Meta_`'toupper($2) Meta_$3 Meta_`'toupper($3) \ Meta_Control_$2 Meta_Control_$2 Meta_Control_$3 Meta_Control_$3') # AltGr used to be console + 12... define(`function', `keycode $1 = F$2 F`'eval($2 + 10) F$2 F`'eval($2 + 10) \ F$2 F`'eval($2 + 10) F$2 F`'eval($2 + 10) \ Console_$2 Console_`'eval($2 + 12) Console_$2 Console_`'eval($2 + 12) \ Console_$2 Console_`'eval($2 + 12) Console_$2 Console_`'eval($2 + 12)') define(`keypad', `keycode $1 = KP_$2 alt keycode $1 = Ascii_$2 AltGr alt keycode $1 = Ascii_$2') keycode 1 = Escape Escape Escape Escape alt keycode 1 = Meta_Escape AltGr Alt keycode 1 = Meta_Escape keycode 2 = one exclam one exclam alt keycode 2 = Meta_one AltGr alt keycode 2 = Meta_one keycode 3 = two at two at control keycode 3 = nul alt keycode 3 = Meta_two alt Shift keycode 3 = Meta_at AltGr control keycode 3 = nul AltGr alt keycode 3 = Meta_two AltGr alt Shift keycode 3 = Meta_at keycode 4 = three numbersign three numbersign \ Escape VoidSymbol Escape VoidSymbol \ Meta_three Meta_numbersign Meta_three Meta_numbersign keycode 5 = four dollar four dollar \ Control_backslash VoidSymbol Control_backslash VoidSymbol \ Meta_four Meta_dollar Meta_four Meta_dollar keycode 6 = five percent five percent \ Control_bracketright VoidSymbol Control_bracketright VoidSymbol \ Meta_five Meta_percent Meta_five Meta_percent keycode 7 = six asciicircum six asciicircum \ Control_asciicircum VoidSymbol Control_asciicircum VoidSymbol \ Meta_six Meta_asciicircum Meta_six Meta_asciicircum dnl altgr 7 used to be braceleft. Removed. keycode 8 = seven ampersand seven ampersand \ Control_underscore VoidSymbol Control_underscore VoidSymbol \ Meta_seven Meta_ampersand Meta_ampersand Meta_ampersand dnl altgr 8 used to be bracketleft. Removed. keycode 9 = eight asterisk eight asterisk \ Delete VoidSymbol Delete VoidSymbol \ Meta_eight Meta_asterisk Meta_eight Meta_asterisk dnl altgr 9 used to be bracketright. Removed. keycode 10 = nine parenleft nine parenleft \ VoidSymbol VoidSymbol VoidSymbol VoidSymbol \ Meta_nine Meta_parenleft Meta_nine Meta_parenleft dnl altgr 0 used to be braceright. Removed. keycode 11 = zero parenright zero parenright \ VoidSymbol VoidSymbol VoidSymbol VoidSymbol \ Meta_zero Meta_parenright Meta_zero Meta_parenright keycode 12 = minus underscore bracketleft braceleft \ Control_underscore Control_underscore Escape VoidSymbol \ Meta_minus backslash Meta_bracketleft VoidSymbol keycode 13 = equal plus bracketright braceright \ VoidSymbol VoidSymbol Control_bracketright VoidSymbol \ Meta_equal VoidSymbol Meta_bracketright asciitilde keycode 14 = Delete Delete Delete alt keycode 14 = Meta_Delete AltGr alt keycode 14 = Meta_Delete keycode 15 = Tab Tab Tab Tab alt keycode 15 = Meta_Tab AltGr alt keycode 15 = Meta_Tab qwerty(16, q) AltGr keycode 16 = apostrophe AltGr Shift keycode 16 = quotedbl AltGr Control keycode 16 = Control_g AltGr Alt keycode 16 = Meta_apostrophe qwerty(17, w) AltGr keycode 17 = comma AltGr Shift keycode 17 = less AltGr alt keycode 17 = Meta_comma qwerty(18, e) AltGr keycode 18 = period AltGr Shift keycode 18 = greater AltGr alt keycode 18 = Meta_period alpha(19, r, p) alpha(20, t, y) alpha(21, y, f) alpha(22, u, g) alpha(23, i, c) alpha(24, o, r) alpha(25, p, l) keycode 26 = bracketleft braceleft slash question \ Escape VoidSymbol Delete VoidSymbol \ Meta_bracketleft VoidSymbol Meta_slash keycode 27 = bracketright braceright equal plus \ Control_bracketright VoidSymbol VoidSymbol VoidSymbol \ Meta_bracketright asciitilde Meta_equal keycode 28 = Return alt keycode 28 = Meta_Control_m keycode 29 = Control alpha(30, a, a) alpha(31, s, o) alpha(32, d, e) alpha(33, f, u) alpha(34, g, i) alpha(35, h, d) alpha(36, j, h) alpha(37, k, t) alpha(38, l, n) dvorak(39, s) keycode 39 = semicolon Shift keycode 39 = colon alt keycode 39 = Meta_semicolon keycode 40 = apostrophe quotedbl minus underscore \ Control_g VoidSymbol Control_underscore Control_underscore \ Meta_apostrophe VoidSymbol Meta_minus backslash keycode 41 = grave asciitilde grave asciitilde \ nul VoidSymbol nul VoidSymbol \ Meta_grave VoidSymbol Meta_grave VoidSymbol keycode 42 = Shift keycode 43 = backslash bar backslash bar control keycode 43 = Control_backslash alt keycode 43 = Meta_backslash AltGr control keycode 43 = Control_backslash AltGr alt keycode 43 = Meta_backslash qwerty(44, z) AltGr keycode 44 = semicolon AltGr Shift keycode 44 = colon alt keycode 44 = Meta_semicolon alpha(45, x, q) alpha(46, c, j) alpha(47, v, k) alpha(48, b, x) alpha(49, n, b) alpha(50, m, m) keycode 51 = comma less Shift Alt keycode 51 = less alt keycode 51 = Meta_comma dvorak(51, w) keycode 52 = period greater control keycode 52 = Compose alt keycode 52 = Meta_period dvorak(52, v) keycode 53 = slash question control keycode 53 = Delete alt keycode 53 = Meta_slash dvorak(53, z) keycode 54 = Shift keycode 55 = KP_Multiply keycode 56 = Alt keycode 57 = space space control keycode 57 = nul alt keycode 57 = Meta_space AltGr keycode 57 = space AltGr Shift keycode 57 = space AltGr control keycode 57 = nul AltGr alt keycode 57 = Meta_space keycode 58 = AltGr_Lock function(59, 1) function(60, 2) function(61, 3) function(62, 4) function(63, 5) function(64, 6) function(65, 7) function(66, 8) function(67, 9) function(68, 10) keycode 69 = Num_Lock Plain keycode 70 = Scroll_Lock Shift keycode 70 = Show_Memory control keycode 70 = Show_State alt keycode 70 = Scroll_Lock Shift alt keycode 70 = Show_Registers AltGr keycode 70 = Scroll_Lock AltGr Shift keycode 70 = Show_Memory AltGr control keycode 70 = Show_State AltGr alt keycode 70 = Scroll_Lock AltGr Shift alt keycode 70 = Show_Registers keypad(71, 7) keypad(72, 8) keypad(73, 9) keycode 74 = KP_Subtract keypad(75, 4) keypad(76, 5) keypad(77, 6) keycode 78 = KP_Add keypad(79, 1) keypad(80, 2) keypad(81, 3) keypad(82, 0) keycode 83 = KP_Period altgr control alt keycode 83 = Boot control alt keycode 83 = Boot keycode 84 = Last_Console keycode 85 = plain keycode 86 = less Shift keycode 86 = greater alt keycode 86 = Meta_less Shift alt keycode 86 = bar AltGr keycode 86 = less AltGr Shift keycode 86 = greater AltGr alt keycode 86 = Meta_less AltGr Shift alt keycode 86 = bar function(87, 11) function(88, 12) keycode 89 = keycode 90 = keycode 91 = keycode 92 = keycode 93 = keycode 94 = keycode 95 = keycode 96 = KP_Enter keycode 97 = Control keycode 98 = KP_Divide keycode 99 = Control_backslash control keycode 99 = Control_backslash alt keycode 99 = Control_backslash AltGr keycode 99 = Control_backslash AltGr control keycode 99 = Control_backslash AltGr alt keycode 99 = Control_backslash keycode 100 = Alt keycode 101 = Break keycode 102 = Find keycode 103 = Up alt keycode 103 = Spawn_Console AltGr alt keycode 103 = Spawn_Console keycode 104 = Prior Shift keycode 104 = Scroll_Backward AltGr Shift keycode 104 = Scroll_Backward keycode 105 = Left alt keycode 105 = Decr_Console AltGr alt keycode 105 = Decr_Console keycode 106 = Right alt keycode 106 = Incr_Console AltGr alt keycode 106 = Incr_Console keycode 107 = Select keycode 108 = Down keycode 109 = Next Shift keycode 109 = Scroll_Forward AltGr Shift keycode 109 = Scroll_Forward keycode 110 = Insert keycode 111 = Remove altgr control alt keycode 111 = Boot control alt keycode 111 = Boot keycode 112 = Macro keycode 113 = F13 keycode 114 = F14 keycode 115 = Help keycode 116 = Do keycode 117 = F17 keycode 118 = KP_MinPlus keycode 119 = Pause keycode 120 = keycode 121 = keycode 122 = keycode 123 = keycode 124 = keycode 125 = keycode 126 = keycode 127 = string F1 = "\033[[A" string F2 = "\033[[B" string F3 = "\033[[C" string F4 = "\033[[D" string F5 = "\033[[E" string F6 = "\033[17~" string F7 = "\033[18~" string F8 = "\033[19~" string F9 = "\033[20~" string F10 = "\033[21~" string F11 = "\033[23~" string F12 = "\033[24~" string F13 = "\033[25~" string F14 = "\033[26~" string F15 = "\033[28~" string F16 = "\033[29~" string F17 = "\033[31~" string F18 = "\033[32~" string F19 = "\033[33~" string F20 = "\033[34~" string Find = "\033[1~" string Insert = "\033[2~" string Remove = "\033[3~" string Select = "\033[4~" string Prior = "\033[5~" string Next = "\033[6~" string Macro = "\033[M" string Pause = "\033[P"