re key definitions in emacs x in a prior article ajaffe oddjob uchicago edu andrew jaffe wrote hi i use emacs and i want to customize my keyboard better when i set up stuff in my emacs with a keymap and define keys i can only access certain of the keys on my x terminal s keyboard i can t get e g f home end pgup pgdn they all seem to have either the same or no keycode i have a feeling this can t be fixed in emacs itself but that i need to do some xmodmap stuff can someone help me unfortunately the key event handling is pretty much hardwired into emacs i ran into this problem a while back my solution was to change the source code so that all of these special keys generated character sequences which basically encoded the keysym and modifier state as escape sequences for example the sequence esc b would indicate that the home key was pressed with the shift key down you could also detect standard keys with odd modifiers such as shift return if anybody wants these changes they re welcome to them but you ll have to have the source available and be comfortable munging with it a bit basically you have to replace the keypress handling code in the source file x term c maybe if someone at osf is interested i can send them the tweaks but i imagine they ve got bigger fish to fry hopefully including the much talked about emacs v if there s sufficient interest i ll post the mods somewhere although this probably isn t the appropriate group for it notes this special code will only apply if you let emacs create its own x window if you run it in plain old tty mode which includes xterm windows then it s business as usual the patches i made were to version under sun os i also did this a while back under hp ux the patches are in a chunk of code between if sun endif but could easily be adapted for anything else mark lanzo kd qlz lanzo tekelec com xx
