eddc@opus.lerc.nasa.gov (Dave Carek) (09/15/90)
Could someone provide me with a little insight on how to remap keys in an xterm window. bindkey doesn't seem to do the job. Any help would be greatly appreciated. -- ----------------------------------------------------------------------- | David Carek | phone: 216-433-8396 | | NASA Lewis Research Center | | | Cleveland, Ohio 44135 | email: eddc@opus.lerc.nasa.gov | |---------------------------------------------------------------------| | Engineer -> An innovative imaginative scientist who must design the | | improbable using the impossible on a budget that is invisible | -----------------------------------------------------------------------
jim@baroque.Stanford.EDU (James Helman) (09/18/90)
X keyboard bindings can be changed globally using xmodmap, e.g. the following binds the caps lock key to <CTL> and changes the backspace key to <DEL>. (Which is after all, where they were before international keyboards forced finger dances such as the Control Stretch Twist or Control Two Hand Boogie upon us.) xmodmap - << xxx clear lock add control = Caps_Lock keycode 66 = Delete Delete xxx xmodmap -pk prints out the keyboard table. If you want to change particular keys under xterm, change mouse button actions or bind function keys to strings, you can modify xterm's resources to create your own keymaps. The following lines in a .Xdefaults file or used as input to xrdb will create special keymaps for the function keys. XTerm*VT100.Translations: #override \ <Key>F1: string("ls -atl") string(0x0d) \n\ <Key>F2: string("ls -alt | head") string(0x0d) \n\ <Key>F10: keymap(mh) \n\ <Key>F11: keymap(dbx) \n\ <Key>F12: keymap(None) \n\ XTerm*VT100.mhKeymap.translations: \ <Key>F1: string("prev") string(0x0d) \n\ <Key>F2: string("comp") string(0x0d) \n\ <Key>F3: string("show") string(0x0d) \n\ <Key>F4: string("repl") string(0x0d) \n\ <Key>F5: string("next") string(0x0d) \n\ <Key>F6: string("forw") string(0x0d) \n\ <Key>F7: string("scan last:10") string(0x0d) \n\ <Key>F8: string("rmm") string(0x0d) XTerm*VT100.dbxKeymap.translations: \ <Key>F1: string("next") string(0x0d) \n\ <Key>F2: string("step") string(0x0d) \n\ <Key>F3: string("continue") string(0x0d) \n\ <Key>F4: string("print ") insert-selection(PRIMARY, CUT_BUFFER0)\n\ <Key>F5: string("stop at ") insert-selection(PRIMARY, CUT_BUFFER0)\n\ <Key>F6: string("up") string(0x0d) \n\ <Key>F7: string("down") string(0x0d) \n\ <Key>F8: string("status") string(0x0d) Jim Helman Department of Applied Physics Durand 012 Stanford University FAX: (415) 725-3377 (jim@KAOS.stanford.edu) Work: (415) 723-9127