# The YUDO map for Linux native! Usage: # m4 yudo.m4 | loadkeys # # keytables name weigth my use # Shift 1 Shift # AltGr 2 Mode # Control 4 Ctrl # Alt 8 Meta # CtrlR 128 Hyper keymaps 0-15,128,129,136,137 dnl changequote([,])dnl dnl undefine([shift])dnl define([mode], [altgr])dnl define([meta], [alt])dnl define([hyper], [ctrlr])dnl dnl define([Mode], [AltGr])dnl define([Meta], [Alt])dnl define([Hyper], [CtrlR])dnl dnl define([SIMPLE], [keycode $1 = $2 $2])dnl dnl dnl yudo-key: YKEY(KEYCODE, UNSHIFTED, SHIFTED, MODE, SHIFT-MODE) dnl define([NMYKEYNM], [ keycode $1 = $2 VoidSymbol shift keycode $1 = $3 mode keycode $1 = $4 ifelse($5,,, shift mode keycode $1 = $5)]) dnl define([NMYKEY], [NMYKEYNM($1,$2,$3,$4,$5) meta mode keycode $1 = [Meta_]$4 ifelse($5,,, shift meta mode keycode $1 = [Meta_]$5)])dnl dnl define([YKEYNM], [NMYKEYNM($1,$2,$3,$4,$5) meta mode keycode $1 = [Meta_]$2 shift meta mode keycode $1 = [Meta_]$3]) dnl define([YKEY], [NMYKEY($1,$2,$3,$4,$5) meta keycode $1 = [Meta_]$2 shift meta keycode $1 = [Meta_]$3])dnl dnl define([NMKEY], [ keycode $1 = $2 VoidSymbol shift keycode $1 = $3])dnl define([KEY], [NMKEY($1,$2,$3) meta keycode $1 = Meta_$2 shift meta keycode $1 = Meta_$3])dnl dnl define([CONTROL], [ control keycode $1 = $2 shift control keycode $1 = $2 control alt keycode $1 = [Meta_]$2 shift control alt keycode $1 = [Meta_]$2])dnl dnl define([MODECONTROL], [ control mode keycode $1 = $2 shift control mode keycode $1 = $2 control meta mode keycode $1 = [Meta_]$2 shift control meta mode keycode $1 = [Meta_]$2])dnl dnl define([HYPER], [ hyper keycode $1 = $2 shift hyper keycode $1 = $2])dnl dnl define([CONTROLHYPER], ifdef([hyper], [ control hyper keycode $1 = $2 shift control hyper keycode $1 = $2]))dnl dnl define([LETSYM], [YKEY($1, $2, $3, $4, $5) CONTROL($1, Control_$2)])dnl dnl define([LETTER], [KEY($1, $2, $3) CONTROL($1, Control_$2)])dnl dnl define([LETLET], [YKEY($1, $2, $3, $4, $5) CONTROL($1, Control_$2) MODECONTROL($1, Control_$4)])dnl dnl dnl For function keys. Call here is FUNCTION(KEYCODE, FKEYNUM). define([BANKSIZE], 12)dnl define([BANKA], [eval(BANKSIZE * 1)]) define([BANKB], [eval(BANKSIZE * 2)]) define([BANKC], [eval(BANKSIZE * 3)]) define([FUNCTION], [ keycode $1 = [F]$2 VoidSymbol shift keycode $1 = [F]eval($2 + BANKA) hyper keycode $1 = [F]eval($2 + BANKB) shift hyper keycode $1 = [F]eval($2 + BANKC) meta keycode $1 = [Console_]$2 shift meta keycode $1 = [Console_]eval($2+BANKA) meta hyper keycode $1 = [Console_]eval($2+BANKB) shift meta hyper keycode $1 = [Console_]eval($2+BANKC)]) dnl dnl For the keypad digits. KPDIGIT(KEYCODE, DIGIT). define([KPDIGIT], [ keycode $1 = KP_$2 VoidSymbol shift keycode $1 = KP_$2 meta keycode $1 = Ascii_$2 shift meta keycode $1 = Ascii_$2])dnl dnl dnl charset "iso-8859-1" YKEY(1, Escape, Escape, Escape, Escape) 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) FUNCTION(87, 11) FUNCTION(88, 12) LETLET(41, z, Z, q, Q) YKEY( 2, one, exclam, asciicircum) CONTROL(2, Control_asciicircum) HYPER( 2, exclamdown) YKEYNM( 3, two, quotedbl, guillemotright) YKEY( 4, three, numbersign, bracketleft) HYPER( 4, pound) YKEY( 5, four, at, bracketright) CONTROL(5, Control_bracketright) HYPER( 5, currency) KEY( 6, five, percent) HYPER( 6, division) KEY( 7, six, ampersand) KEY( 8, seven, slash) KEY( 9, eight, parenleft) KEY( 10, nine, parenright) KEY( 11, zero, equal) HYPER( 11, degree) KEY( 12, plus, question) KEY( 13, apostrophe, grave) KEY( 14, at, at) ! Second row: TAB Q W E R T Y U I O P Å ~ YKEY( 15, Tab, Tab, Tab, Tab) YKEY( 16, Escape, Escape, slash) LETSYM( 17, b, B, bar) LETSYM( 18, t, T, less) LETSYM( 19, f, F, greater) LETSYM( 20, j, J, asciitilde) HYPER( 20, dead_tilde) LETTER( 21, y, Y) LETTER( 22, u, U) LETTER( 23, d, D) LETTER( 24, o, O) LETTER( 25, p, P) YKEY( 26, Delete, Delete, Delete, Delete) KEY( 27, dollar, asterisk) ! Third (main) row: CTRL A S D F G H J K L Ö Ä RET keycode 58 = Control LETSYM( 30, a, A, braceleft) LETSYM( 31, s, S, braceright) HYPER( 31, section) LETLET( 32, n, N, w, W) LETLET( 33, i, I, q, Q) LETSYM( 34, m, M, backslash) LETTER( 35, h, H) LETTER( 36, l, L) LETTER( 37, r, R) LETTER( 38, e, E) keycode 39 = Mode YKEY( 40, minus, slash, bar, backslash) CONTROL(40, Control_backslash) dnl And a special approximation: define([Meta_Return], [Meta_Control_m])dnl KEY( 28, Return, Return) # ShiftL z x c v b n m , . - ShiftR keycode 42 = Shift keycode 44 = Mode LETSYM( 45, x, X, colon) LETSYM( 46, c, C, semicolon) NMYKEY( 47, aring, Aring, underscore) CONTROL(47, Control_underscore) NMKEY( 48, odiaeresis, Odiaeresis) NMKEY( 49, adiaeresis, Adiaeresis) LETTER( 50, g, G) LETSYM( 51, v, V, minus) KEY( 52, period, comma) LETTER( 53, k, K) keycode 54 = Shift ! Fifth row: CTRL < ALT SPACE ALT-GR ' CTRL keycode 29 = Control keycode 86 = Hyper keycode 56 = Meta KEY(57, space, space) CONTROL(57, nul) HYPER(57, nobreakspace) keycode 100 = Meta keycode 43 = VoidSymbol KEY( 97, Linefeed, Linefeed) # 7 8 9 + KPDIGIT(71, 7) KPDIGIT(72, 8) KPDIGIT(73, 9) SIMPLE(78, KP_Add) # 4 5 6 KPDIGIT(75, 4) KPDIGIT(76, 5) KPDIGIT(77, 6) # 1 2 3 Enter KPDIGIT(79, 1) KPDIGIT(80, 2) KPDIGIT(81, 3) SIMPLE(96, KP_Enter) # 0 . KPDIGIT(82, 0) SIMPLE(83, KP_Period) # NumLock / * - SIMPLE(69, Num_Lock) SIMPLE(98, KP_Divide) SIMPLE(55, KP_Multiply) SIMPLE(74, KP_Subtract) # Everyone needs a compose key. This is C-.. control keycode 52 = Compose # PrScr ScrollLock Pause # SysRq. I suppose there's some reason it's ^\. SIMPLE(99, Control_backslash) keycode 70 = Scroll_Lock shift keycode 70 = Show_Memory control keycode 70 = Show_State alt keycode 70 = Show_Registers SIMPLE(119, Pause) # Ctrl-Break seems to have low-level hardware behind it. SIMPLE(101, Break) # INS HOME PgUp SIMPLE(110, Insert) SIMPLE(102, Find) keycode 104 = Prior Scroll_Backward # DEL End PgDown SIMPLE(111, Remove) SIMPLE(107, Select) keycode 109 = Next Scroll_Forward # Up SIMPLE(103, Up) # Left Down Right SIMPLE(105, Left) alt keycode 105 = Decr_Console SIMPLE(108, Down) SIMPLE(106, Right) alt keycode 106 = Incr_Console control alt keycode 83 = Boot control alt keycode 111 = Boot # Stock VT102 string definitions. changequote()dnl 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" # Stock ISO-8859-1 compositions. changequote()dnl compose '`' 'A' to 'À' compose '`' 'a' to 'à' compose '\'' 'A' to 'Á' compose '\'' 'a' to 'á' compose '^' 'A' to 'Â' compose '^' 'a' to 'â' compose '~' 'A' to 'Ã' compose '~' 'a' to 'ã' compose '"' 'A' to 'Ä' compose '"' 'a' to 'ä' compose 'O' 'A' to 'Å' compose 'o' 'a' to 'å' compose '0' 'A' to 'Å' compose '0' 'a' to 'å' compose 'A' 'A' to 'Å' compose 'a' 'a' to 'å' compose 'A' 'E' to 'Æ' compose 'a' 'e' to 'æ' compose ',' 'C' to 'Ç' compose ',' 'c' to 'ç' compose '`' 'E' to 'È' compose '`' 'e' to 'è' compose '\'' 'E' to 'É' compose '\'' 'e' to 'é' compose '^' 'E' to 'Ê' compose '^' 'e' to 'ê' compose '"' 'E' to 'Ë' compose '"' 'e' to 'ë' compose '`' 'I' to 'Ì' compose '`' 'i' to 'ì' compose '\'' 'I' to 'Í' compose '\'' 'i' to 'í' compose '^' 'I' to 'Î' compose '^' 'i' to 'î' compose '"' 'I' to 'Ï' compose '"' 'i' to 'ï' compose '-' 'D' to 'Ð' compose '-' 'd' to 'ð' compose '~' 'N' to 'Ñ' compose '~' 'n' to 'ñ' compose '`' 'O' to 'Ò' compose '`' 'o' to 'ò' compose '\'' 'O' to 'Ó' compose '\'' 'o' to 'ó' compose '^' 'O' to 'Ô' compose '^' 'o' to 'ô' compose '~' 'O' to 'Õ' compose '~' 'o' to 'õ' compose '"' 'O' to 'Ö' compose '"' 'o' to 'ö' compose '/' 'O' to 'Ø' compose '/' 'o' to 'ø' compose '`' 'U' to 'Ù' compose '`' 'u' to 'ù' compose '\'' 'U' to 'Ú' compose '\'' 'u' to 'ú' compose '^' 'U' to 'Û' compose '^' 'u' to 'û' compose '"' 'U' to 'Ü' compose '"' 'u' to 'ü' compose '\'' 'Y' to 'Ý' compose '\'' 'y' to 'ý' compose 'T' 'H' to 'Þ' compose 't' 'h' to 'þ' compose 's' 's' to 'ß' compose '"' 'y' to 'ÿ' compose 's' 'z' to 'ß' compose 'i' 'j' to 'ÿ' HYPER(12, hyphen) HYPER(13, macron) HYPER(16, onequarter) HYPER(17, onehalf) HYPER(18, threequarters) HYPER(19, registered) HYPER(22, mu) HYPER(24, masculine) HYPER(25, 182) # pilcrow HYPER(26, plusminus) HYPER(27, notsign) HYPER(30, ordfeminine) HYPER(32, dead_diaeresis) HYPER(35, cent) HYPER(36, onesuperior) HYPER(37, twosuperior) HYPER(38, threesuperior) HYPER(39, periodcentered) HYPER(40, dead_acute) HYPER(41, dead_grave) HYPER(43, brokenbar) HYPER(45, multiplication) HYPER(46, copyright) HYPER(51, guillemotleft) HYPER(53, questiondown) SIMPLE(118, KP_MinPlus)