Package: rdesktop
Version: 1.6.0-3
Severity: normal
Tags: patch

*** Please type your report below this line ***

If AltGr is down, leave it down, the translators list
when it needs to be added not removed.

It's either already held for the key (if the keyboard mappings are
the same), or it isn't and isn't required for that keysym.
Currently for en-us keyboard layouts the right alt is nearly
useless.  It can't be used with any other key in chording
such as Alt-F4, Alt-F, Alt-Left, Alt-Right, trying will
send an Alt_R up before and Alt_R down after causing windows to
see it as if the Alt_R wasn't held.
I think this is a good compromise, those who are using Alt_R for
AltGr composition will be used to not holding it when pressing
other keys, and for the rest of us it will finally work.

Note, I don't have an AltGr client or server to test this with.

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

Kernel: Linux 2.6.35-rc1+ (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages rdesktop depends on:
ii  libasound2                    1.0.22-2   shared library for ALSA applicatio
ii  libc6                         2.10.2-9   Embedded GNU C Library: Shared lib
ii  libssl0.9.8                   0.9.8n-1   SSL shared libraries
ii  libx11-6                      2:1.3.3-3  X11 client-side library

rdesktop recommends no packages.

rdesktop suggests no packages.

-- no debconf information
---
 xkeymap.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/xkeymap.c b/xkeymap.c
index f729b4e..937e9f1 100644
--- a/xkeymap.c
+++ b/xkeymap.c
@@ -714,6 +714,10 @@ xkeymap_send_keys(uint32 keysym, unsigned int keycode, unsigned int state, uint3
 		if (tr.scancode == 0)
 			return;
 
+		/* If AltGr is down, leave it down, the translators list
+		 * when it needs to be added not removed.
+		 */
+		tr.modifiers |= remote_modifier_state & MapAltGrMask;
 		save_remote_modifiers(tr.scancode);
 		ensure_remote_modifiers(ev_time, tr);
 		rdp_send_scancode(ev_time, pressed ? RDP_KEYPRESS : RDP_KEYRELEASE, tr.scancode);
-- 
1.7.0

Reply via email to