c30845@tansei.cc.u-tokyo.JUNET (c30845) (05/21/88)
I am a fairly new user to Emacs (version 18.47). I cannot send a DEL from my terminal to the host machine (the network captures them on the way). I've side-stepped this by using define-key to assign an unused control character to \177. This works fine except in an incremental search. Instead of backing up a character, I drop out of the search. Is this caused by the read-char function returning the original keystroke and not the mapping? Can it be fixed? Is there another solution? Thanks in advance, -- Keith Rowe Naito Lab. Tech. U. of Nagaoka c30845@tansei.cc.u-tokyo.junet "God keep me from ever completing anything."
moore%cdr.utah.edu.uucp@utah-gr.UUCP (Tim Moore) (05/22/88)
In article <1975@tansei.cc.u-tokyo.JUNET> c30845@tansei.cc.u-tokyo.JUNET (c30845) writes: > >I am a fairly new user to Emacs (version 18.47). I cannot >send a DEL from my terminal to the host machine (the network > >I've side-stepped this by using define-key to assign an unused >control character to \177. This works fine except in >an incremental search. Instead of backing up a character, A more general way to redefine keys is to use the (almost) undocumented keyboard-translate-table. This a string M characters long; characters with ascii codes < M get mapped to the character at that position in the string (starting at 0). As an example, here's code from my .emacs file to map DEL to ^h (backspace) and bind help to something else: ;;; map \^h to delete (setq keyboard-translate-table "\0\1\2\3\4\5\6\7\177") (define-key global-map "\M-?" 'help-command) (define-key global-map "\M-?a" 'apropos) Hope this helps. -Tim Moore 4560 M.E.B. internet:moore@cs.utah.edu University of Utah ABUSENET:{ihnp4, decvax}!utah-cs!moore Salt Lake City, UT 84112