unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* read-key-sequence(-vector) on Shift left/right gives [left]/[right], not [S-left]/[S-right] ?
@ 2004-09-07  0:02 Drew Adams
  2004-09-07 11:55 ` Kai Grossjohann
  0 siblings, 1 reply; 16+ messages in thread
From: Drew Adams @ 2004-09-07  0:02 UTC (permalink / raw)


(defun foo ()
 (interactive)
 (let ((foo (read-key-sequence-vector "" )))
 (message "foo: %s" foo)))

Execute foo, press Shift+[left] or Shift+[right]. The message ([left] or
[right]) shows that the Shift modifier is lost.

However, if you press Shift+[up] or Shift+[down], the message is [S-up] or
[S-down]. That seems correct to me.

Same thing with read-key-sequence as with read-key-sequence-vector.

Is this a bug?

I'm using Emacs 20.7.3 on Windows: (i386-*-nt5.1.2600) of Thu Dec 21 2000 on
buffy.

If I try this on Emacs 21 (21.3.50.1 - i386-mingw-nt5.1.2600 of 2004-04-27
on BERATUNG4), then the Shift modifier is lost on the S-up and S-down also.
Is this intended?

How can I read the key sequence and obtain the modifier?

Thanks,

  Drew

^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <mailman.1740.1094515688.1998.help-gnu-emacs@gnu.org>]
* RE: read-key-sequence(-vector) on Shift left/right gives[left]/[right], not [S-left]/[S-right]
@ 2004-09-08 16:08 Charles_Davis
  2004-09-09  8:34 ` Kai Grossjohann
  0 siblings, 1 reply; 16+ messages in thread
From: Charles_Davis @ 2004-09-08 16:08 UTC (permalink / raw)


      I hope that I can piggy-back on this thread to get a clue to the
problem I posted last week.  It seems germane, but I don't know enough to
know how it applies.

I cannot seem to get Emacs to recognize either the control or shift
modifiers for any of the arrow or 6-pack keys.  Only the meta-key modifier
seems to be recognized.  Is there some variable I need to set to make the
use of control and shift modifiers of these keys possible?

Thanks for the help.

Regards,
Charles Davis

^ permalink raw reply	[flat|nested] 16+ messages in thread
[parent not found: <mailman.1987.1094660096.1998.help-gnu-emacs@gnu.org>]
* Re: read-key-sequence(-vector) on Shift left/right gives[left]/[right], not [S-left]/[S-right]
@ 2004-09-09 11:39 Charles_Davis
  2004-09-09 12:54 ` Kai Grossjohann
       [not found] ` <mailman.2142.1094734877.1998.help-gnu-emacs@gnu.org>
  0 siblings, 2 replies; 16+ messages in thread
From: Charles_Davis @ 2004-09-09 11:39 UTC (permalink / raw)


Kai Grossjohann wrote:
> When you use a terminal, it sends escape sequences to the application
> when you hit the cursor keys.  Many terminals send the same escape
> sequence for, say, <left> and C-<left> and S-<left>.  So the
> application (Emacs in this case) cannot distinguish them.
> These days, terminals can be configured to send different escape
> sequences for these cases.  Then you need to teach Emacs which escape
> sequence stands for which keypress, and then you can bind these
>keypresses normally.
Kai

I am running Emacs from a BASH shell under CYGWIN.  I have tried changing
the terminal type from the default "cygwin" by doing

TERM=<term type>
export TERM

for 10-15 different terminal types.  Emacs seems to notice that I have
changed terminal type, for it changes the names of the keys.  However, in
every case, the control and shift modifiers are not noticed.

Can you suggest a terminal type for which these modifiers should work?

Thanks for the help.
Regards,
Charles




 Kai Grossjohann

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2004-09-26 11:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-07  0:02 read-key-sequence(-vector) on Shift left/right gives [left]/[right], not [S-left]/[S-right] ? Drew Adams
2004-09-07 11:55 ` Kai Grossjohann
2004-09-07 14:32   ` read-key-sequence(-vector) on Shift left/right gives[left]/[right], " Drew Adams
2004-09-07 14:47     ` Stefan
2004-09-07 15:47       ` Drew Adams
2004-09-08  0:22     ` Richard Stallman
2004-09-08  0:47       ` Drew Adams
     [not found] <mailman.1740.1094515688.1998.help-gnu-emacs@gnu.org>
2004-09-07  1:21 ` read-key-sequence(-vector) on Shift left/right gives [left]/[right], " Katsumi Yamaoka
  -- strict thread matches above, loose matches on Subject: below --
2004-09-08 16:08 read-key-sequence(-vector) on Shift left/right gives[left]/[right], not [S-left]/[S-right] Charles_Davis
2004-09-09  8:34 ` Kai Grossjohann
     [not found] <mailman.1987.1094660096.1998.help-gnu-emacs@gnu.org>
2004-09-08 20:38 ` Alan Mackenzie
2004-09-09  3:02 ` Luc Teirlinck
2004-09-09 11:39 Charles_Davis
2004-09-09 12:54 ` Kai Grossjohann
     [not found] ` <mailman.2142.1094734877.1998.help-gnu-emacs@gnu.org>
2004-09-09 18:43   ` Thomas Dickey
2004-09-26 11:51     ` Kai Grossjohann

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).