Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!nntp.coast.net!www.nntp.primenet.com!nntp.primenet.com!news.mathworks.com!fu-berlin.de!irz401!orion.sax.de!uriah.heep!news From: j@uriah.heep.sax.de (J Wunsch) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: xmodmap? Date: 28 Sep 1996 16:19:17 GMT Organization: Private BSD site, Dresden Lines: 161 Message-ID: <52jj65$2p5@uriah.heep.sax.de> References: <3242FE9A.3F54BC7E@bombay.gps.caltech.edu> Reply-To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) NNTP-Posting-Host: localhost.heep.sax.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: knews 0.9.6 X-Phone: +49-351-2012 669 X-PGP-Fingerprint: DC 47 E6 E4 FF A6 E9 8F 93 21 E0 7D F9 12 D6 4E Stan <stan@bombay.gps.caltech.edu> wrote: > Does anyone know how to use xmodmap to change the keyboard mappings? xmodmap - <<EOF ! German keyboard with a programmer-like mapping, ! J"org Wunsch <joerg_wunsch@uriah.sax.de> ! ! (``programmer-like'' stands for having brackets and braces on diaeresis ! keys, whereas the ModeShifted keys result in umlauts) ! ! Note: the modifier keys are commented out, since they are remapped ! within Xconfig to match internationalization requirements ! keycode 9 = Escape keycode 10 = 1 exclam keycode 11 = 2 quotedbl twosuperior keycode 12 = 3 section threesuperior keycode 13 = 4 dollar keycode 14 = 5 percent keycode 15 = 6 ampersand keycode 16 = 7 slash braceleft keycode 17 = 8 parenleft bracketleft keycode 18 = 9 parenright bracketright keycode 19 = 0 equal braceright keycode 20 = ssharp question backslash keycode 21 = apostrophe grave keycode 22 = Delete keycode 23 = Tab keycode 24 = q Q at keycode 25 = W keycode 26 = E keycode 27 = R keycode 28 = T keycode 29 = Z keycode 30 = U keycode 31 = I keycode 32 = O keycode 33 = P keycode 34 = bracketright braceright udiaeresis Udiaeresis keycode 35 = plus asterisk asciitilde keycode 36 = Return ! keycode 37 = Control_L keycode 38 = A keycode 39 = S keycode 40 = D keycode 41 = F keycode 42 = G keycode 43 = H keycode 44 = J keycode 45 = K keycode 46 = L keycode 47 = backslash bar odiaeresis Odiaeresis keycode 48 = bracketleft braceleft adiaeresis Adiaeresis keycode 49 = asciicircum degree ! keycode 50 = Shift_L keycode 51 = numbersign apostrophe keycode 52 = Y keycode 53 = X keycode 54 = C keycode 55 = V keycode 56 = B keycode 57 = N keycode 58 = m M mu keycode 59 = comma semicolon keycode 60 = period colon keycode 61 = minus underscore ! keycode 62 = Shift_R keycode 63 = KP_Multiply ! keycode 64 = Alt_L Meta_L keycode 65 = space ! keycode 66 = Caps_Lock keycode 67 = F1 keycode 68 = F2 keycode 69 = F3 keycode 70 = F4 keycode 71 = F5 keycode 72 = F6 keycode 73 = F7 keycode 74 = F8 keycode 75 = F9 keycode 76 = F10 ! keycode 77 = Num_Lock keycode 78 = Multi_key keycode 79 = KP_7 keycode 80 = KP_8 keycode 81 = KP_9 keycode 82 = KP_Subtract keycode 83 = KP_4 keycode 84 = KP_5 keycode 85 = KP_6 keycode 86 = KP_Add keycode 87 = KP_1 keycode 88 = KP_2 keycode 89 = KP_3 keycode 90 = KP_0 keycode 91 = KP_Decimal ! keycode 92 = X386Sys_Req keycode 93 = keycode 94 = less greater bar keycode 95 = F11 keycode 96 = F12 keycode 97 = Home keycode 98 = Up keycode 99 = Prior keycode 100 = Left keycode 101 = Begin keycode 102 = Right keycode 103 = End keycode 104 = Down keycode 105 = Next keycode 106 = Insert keycode 107 = Delete keycode 108 = KP_Enter ! keycode 109 = Control_R keycode 110 = Pause keycode 111 = Print keycode 112 = KP_Divide keycode 113 = Mode_switch keycode 114 = Break EOF ...for example. That's what i'm using, with an XFree86 server, and with a German keyboard, however with a very weird key mapping. Anyway: > I spend most of my time here connected to VAX machines, so I need a good > VT emulation. The xterm vt102 mode is pretty good except for apparently > not having the PF1-PF4 keypad keys mapped. [Doing VMS without the Gold > key is *very* painful.]] What you want is not to tweak the server's key mapping, but to modify the mapping between key codes and xterm function key sequences. This is done by xterm X11 resources. For example, one of the menues of my window manager starts up an xterm with DOS-like arrow keys as: Exec "local - DOSkeys" exec xterm -ls -name dosterm & My app-defaults file for XTerm then overrides the default in case an xterm instance is named `dosterm' by: dosterm*background: black dosterm*foreground: white dosterm*cursorColor: peachPuff dosterm*VT100.font: vga dosterm*VT100.Translations: #override \ <Key>BackSpace: string(0x08)\n\ <Key>Up: string(0x00)string(0x48)\n\ <Key>Down: string(0x00)string(0x50)\n\ <Key>Left: string(0x00)string(0x4b)\n\ <Key>Right: string(0x00)string(0x4d) Together with RTFM'ing xterm(1), this should get you the picture. -- cheers, J"org joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE Never trust an operating system you don't have sources for. ;-)