Debian Bug report logs - #638694
xterm: alt-<arrow> == <arrow>

version graph

Package: xterm; Maintainer for xterm is Debian X Strike Force <debian-x@lists.debian.org>; Source for xterm is src:xterm.

Reported by: Ahmad Khayyat <akhayyat@gmail.com>

Date: Sun, 21 Aug 2011 06:36:02 UTC

Severity: normal

Found in version xterm/271-1

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#638694; Package xterm. (Sun, 21 Aug 2011 06:36:04 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ahmad Khayyat <akhayyat@gmail.com>:
New Bug report received and forwarded. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Sun, 21 Aug 2011 06:36:05 GMT) Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Ahmad Khayyat <akhayyat@gmail.com>
To: bugs@debian.org
Subject: xterm: alt-<arrow> == <arrow>
Date: Sun, 21 Aug 2011 02:32:58 -0400
[Message part 1 (text/plain, inline)]
Subject: xterm: alt-<arrow> == <arrow>
Package: xterm
Version: 271-1
Severity: normal

Alt key works perfectly as a modifier with any key except for the arrow keys
(left, right, up, down).
With arrow keys, alt-<arrow> produces the same codes as <arrow> alone, as
shown by ctrl-v alt-<arrow>.

After adding the grp:alts_toggle xkb option, only the left alt key behaves
correctly, but the right alt key then becomes ISO_Level3_Shift, as reported
by xev.
xmodmap shows ISO_Level3_Shift to be Mod5. Moving ISO_Level3_Shift from Mod5
to Mod1 breaks alt-<arrow> again.

Only grp:alts_toggle can fix alt-<arrow>, and then it mutates alt_r
into ISO_Level3_Shift. Other toggle options have no effect on this issue.
Note also that alts_toggle and ctrls_toggle don't actually do any toggling.
I tried menu_toggle and shifts_toggle and they do toggle.

I am not sure if this is xterm's fault, but gnome-terminal does not have
this problem.

$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     us,ar

-> alt-<arrow> == <arrow>

$ setxkbmap -option grp:alts_toggle
$ setxkbmap -query
rules:      evdev
model:      pc105
layout:     us,ar
options:    grp:alts_toggle

-> alt_L-<arrow> Works
-> alt_R-<any> == <any>
-> alt_R is ISO_Level3_Shift

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 3.0.0-1-amd64 (SMP w/1 CPU core)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) (ignored:
LC_ALL set to en_CA.UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages xterm depends on:
ii  libc6                         2.13-10    Embedded GNU C Library: Shared
lib
ii  libfontconfig1                2.8.0-3    generic font configuration
library
ii  libice6                       2:1.0.7-2  X11 Inter-Client Exchange
library
ii  libncurses5                   5.9-1      shared libraries for terminal
hand
ii  libutempter0                  1.1.5-4    A privileged helper for
utmp/wtmp
ii  libx11-6                      2:1.4.4-1  X11 client-side library
ii  libxaw7                       2:1.0.9-2  X11 Athena Widget library
ii  libxft2                       2.2.0-3    FreeType-based font drawing
librar
ii  libxmu6                       2:1.1.0-2  X11 miscellaneous utility
library
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#638694; Package xterm. (Sun, 21 Aug 2011 11:03:13 GMT) Full text and rfc822 format available.

Acknowledgement sent to Thomas Dickey <dickey@his.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Sun, 21 Aug 2011 11:03:19 GMT) Full text and rfc822 format available.

Message #10 received at 638694@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Ahmad Khayyat <akhayyat@gmail.com>, 638694@bugs.debian.org
Cc: Debian X Strike Force <debian-x@lists.debian.org>
Subject: Re: Bug#638694: xterm: alt-<arrow> == <arrow>
Date: Sun, 21 Aug 2011 06:49:47 -0400 (EDT)
On Sun, 21 Aug 2011, Ahmad Khayyat wrote:

> Subject: xterm: alt-<arrow> == <arrow>
> Package: xterm
> Version: 271-1
> Severity: normal
>
> Alt key works perfectly as a modifier with any key except for the arrow keys
> (left, right, up, down).
> With arrow keys, alt-<arrow> produces the same codes as <arrow> alone, as
> shown by ctrl-v alt-<arrow>.
>
> After adding the grp:alts_toggle xkb option, only the left alt key behaves
> correctly, but the right alt key then becomes ISO_Level3_Shift, as reported
> by xev.
> xmodmap shows ISO_Level3_Shift to be Mod5. Moving ISO_Level3_Shift from Mod5
> to Mod1 breaks alt-<arrow> again.
>
> Only grp:alts_toggle can fix alt-<arrow>, and then it mutates alt_r
> into ISO_Level3_Shift. Other toggle options have no effect on this issue.
> Note also that alts_toggle and ctrls_toggle don't actually do any toggling.
> I tried menu_toggle and shifts_toggle and they do toggle.
>
> I am not sure if this is xterm's fault, but gnome-terminal does not have
> this problem.

gnome-terminal doesn't do much at all with keyboard events.

xterm is making a check to keep the level3 shift key distinct from alt
and meta - which is for the case you're describing.  If it's assigned
to the same key, then xterm won't honor alt/meta on that key.

I do recall some comment a while back about the ISO_Level3_Shift, that 
xterm's check for it isn't necessary.  I'll look for that in my email, to 
compare it with this case, probably remove the check - or add a resource 
to control whether the conflict is ignored.  It's a one-liner in input.c

(I don't have a pc105 keyboard, so I don't think I can test this
directly myself).

> $ setxkbmap -query
> rules:      evdev
> model:      pc105
> layout:     us,ar
>
> -> alt-<arrow> == <arrow>
>
> $ setxkbmap -option grp:alts_toggle
> $ setxkbmap -query
> rules:      evdev
> model:      pc105
> layout:     us,ar
> options:    grp:alts_toggle
>
> -> alt_L-<arrow> Works
> -> alt_R-<any> == <any>
> -> alt_R is ISO_Level3_Shift
>
> -- System Information:
> Debian Release: wheezy/sid
>  APT prefers testing
>  APT policy: (500, 'testing')
> Architecture: amd64 (x86_64)
>
> Kernel: Linux 3.0.0-1-amd64 (SMP w/1 CPU core)
> Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) (ignored:
> LC_ALL set to en_CA.UTF-8)
> Shell: /bin/sh linked to /bin/dash
>
> Versions of packages xterm depends on:
> ii  libc6                         2.13-10    Embedded GNU C Library: Shared
> lib
> ii  libfontconfig1                2.8.0-3    generic font configuration
> library
> ii  libice6                       2:1.0.7-2  X11 Inter-Client Exchange
> library
> ii  libncurses5                   5.9-1      shared libraries for terminal
> hand
> ii  libutempter0                  1.1.5-4    A privileged helper for
> utmp/wtmp
> ii  libx11-6                      2:1.4.4-1  X11 client-side library
> ii  libxaw7                       2:1.0.9-2  X11 Athena Widget library
> ii  libxft2                       2.2.0-3    FreeType-based font drawing
> librar
> ii  libxmu6                       2:1.1.0-2  X11 miscellaneous utility
> library
>

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net




Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#638694; Package xterm. (Sun, 21 Aug 2011 19:33:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ahmad Khayyat <akhayyat@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Sun, 21 Aug 2011 19:33:03 GMT) Full text and rfc822 format available.

Message #15 received at 638694@bugs.debian.org (full text, mbox):

From: Ahmad Khayyat <akhayyat@gmail.com>
To: 638694@bugs.debian.org
Subject: Re: Bug#638694: Acknowledgement (xterm: alt-<arrow> == <arrow>)
Date: Sun, 21 Aug 2011 15:30:48 -0400
[Message part 1 (text/plain, inline)]
I just realized that I have the same problem in emacs: when I add the
grp:alts_toggle option, the left alt works fine, but the right alt is not
alt/meta at all.
So, I suppose if this can be fixed at the xkb layer, it could be more
useful. Any hints?
[Message part 2 (text/html, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian X Strike Force <debian-x@lists.debian.org>:
Bug#638694; Package xterm. (Fri, 26 Aug 2011 00:54:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ahmad Khayyat <akhayyat@gmail.com>:
Extra info received and forwarded to list. Copy sent to Debian X Strike Force <debian-x@lists.debian.org>. (Fri, 26 Aug 2011 00:54:07 GMT) Full text and rfc822 format available.

Message #20 received at 638694@bugs.debian.org (full text, mbox):

From: Ahmad Khayyat <akhayyat@gmail.com>
To: 638694@bugs.debian.org
Subject: Workaround
Date: Thu, 25 Aug 2011 20:50:02 -0400
[Message part 1 (text/plain, inline)]
xmodmap -e "keycode 108 = Alt_R"

This brings back alt/meta behavior to the right alt key while using the us
layout, but not while using other international layouts.
us layout: right alt is Alt_R
other layout: right alt is NoSymbol
[Message part 2 (text/html, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Apr 19 00:52:23 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.