Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!rochester!pt.cs.cmu.edu!pt!clamen From: clamen@CLAMEN.AVALON.CS.CMU.EDU (Stewart Clamen) Newsgroups: gnu.emacs.bug Subject: Rebinding Arrow Keys Message-ID: Date: 25 Apr 89 22:41:23 GMT Distribution: gnu Organization: Carnegie Mellon University Lines: 55 One of my users has rebound ^F, but wants the rightarrow key to still map to 'forward-char. Problem is, the GNU Emacs/X interface translates the arrow keys DIRECTLY into ^F/^B/^P/^N. Here's the code, from internal_socket_read() in src/x11term.c . ----- if (IsFunctionKey(keysym) || IsMiscFunctionKey(keysym)) { strcpy(mapping_buf,"["); strcat(mapping_buf,stringFuncVal(keysym)); #ifdef sun strcat(mapping_buf,"z"); #else strcat(mapping_buf,"~"); #endif /* sun */ nbytes = strlen(mapping_buf); } else { switch (keysym) { case XK_Left: strcpy(mapping_buf,"\002"); nbytes = 1; break; case XK_Right: strcpy(mapping_buf,"\006"); nbytes = 1; break; case XK_Up: strcpy(mapping_buf,"\020"); nbytes = 1; break; case XK_Down: strcpy(mapping_buf,"\016"); nbytes = 1; break; } } ----- A similar thing is done in the X10 support (src/xterm.c). I realize that an easy fix would be to remove the test and map all non-standard keys to the funny escape sequences. Any opinions on whether this is a good thing to do? -- ------------------------------------------------------------------------------ Stewart M. Clamen School of Computer Science, Carnegie Mellon University Pittsburgh, PA 15213-3890 INTERNET: clamen@CS.CMU.EDU USENET: ...!uunet!"clamen@cs.cmu.edu" --