unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Subject: Re: can't global-set-key in emacs -nw
Date: Sun, 01 Feb 2004 16:56:25 GMT	[thread overview]
Message-ID: <jwvad427nhg.fsf-monnier+gnu.emacs.help@asado.iro.umontreal.ca> (raw)
In-Reply-To: m3d68zprrc.fsf@localhost.localdomain

> 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

  parent reply	other threads:[~2004-02-01 16:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-01  0:27 can't global-set-key in emacs -nw Joel Smith
2004-02-01  6:33 ` Eli Zaretskii
2004-02-01 16:56 ` Stefan Monnier [this message]
2004-02-01 22:57   ` Peter Heslin
2004-02-02  0:44     ` Stefan Monnier
2004-02-02 21:04       ` Peter Heslin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvad427nhg.fsf-monnier+gnu.emacs.help@asado.iro.umontreal.ca \
    --to=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).