help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: can't global-set-key in emacs -nw


From: Stefan Monnier
Subject: Re: can't global-set-key in emacs -nw
Date: Sun, 01 Feb 2004 16:56:25 GMT
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

> using xterm or aterm i can't set any keys using the shift key.  for
> example 
> (global-set-key [(shift right)] "\C-e")
> won't do anything in aterm.  in xterm it inserts 2C.  

First, you need to make sure your terminal sends some useful byte-sequence
when you press those keys.  Most terminal emulators send the same sequence
for shirt-right than for right, so Emacs simply can't tell the difference.

Once your terminal emulator is properly configured you need to tell Emacs
what that seuqnce is by appropriate (define-key function-key-map ...) calls.
See lisp/term/xterm.el for some default settings used if your terminal
is xterm.  The same terminal emulator may send different sequences
depending on the configuration, so there's no standard sadly.

> resetting the home, end keys doesn't work, and backspace starts help
> in aterm.  it's fine in xterm.

I.e. in your xterm, the backspace key sends code 127 (aka C-?) whereas in
your aterm it sends code 8 (aka C-h).  Fix your aterm config.

> finally the mouse doesn't work.  

M-x xterm-mouse-mode might help.  I don't know if aterm supports this
xterm-specific extension.


        Stefan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]