[prev in list] [next in list] [prev in thread] [next in thread] 

List:       rdesktop-devel
Subject:    [rdesktop-devel] [ rdesktop-Patches-2123862 ] Patch to make AltGr
From:       "SourceForge.net" <noreply () sourceforge ! net>
Date:       2008-09-23 3:22:44
Message-ID: E1KhyU8-0007UH-Ls () d55xhf1 ! ch3 ! sourceforge ! com
[Download RAW message or body]

Patches item #2123862, was opened at 2008-09-22 23:22
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381349&aid=2123862&group_id=24366

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Andrew Neitsch (neitsch)
Assigned to: Nobody/Anonymous (nobody)
Summary: Patch to make AltGr work

Initial Comment:
I have a custom keyboard layout, created with Microsoft Keyboard Layout Creator, that \
uses the right alt key as a mode switch. For example, RightAlt+8 yields infinity. It \
wasnt working properly in rdesktop. The problem turned out to be that rdesktop \
maintains its own notion of remote modifier state that it enforces on keypresses. The \
AltGr key in Windows is equivalent to pressing Ctrl-Alt, so doing

	Press AltGr
	Press 8
	Release 8
	Release AltGr

should yield (as Spy++ running in the mstsc client shows)

	WM_KEYDOWN	VK_CONTROL
	WM_KEYDOWN	VK_MENU (aka alt)
	WM_KEYDOWN	'8'
	WM_KEYUP		'8'
	WM_SYSKEYUP	VK_CONTROL
	WM_KEYUP		VK_MENU

but rdesktop was clearing the modifier state right before the '8' and restoring it \
afterwards, so it was coming out

	# Press AltGr
	WM_KEYDOWN	VK_CONTROL
	WM_KEYDOWN	VK_MENU
	# Press '8' (restore modifier state first)
	WM_SYSKEYUP	VK_CONTROL
	WM_KEYUP	VK_MENU
	WM_KEYDOWN	'8'
	# Restore modifier state?
	WM_KEYDOWN	VK_CONTROL
	WM_KEYDOWN	VK_MENU
	WM_KEYUP	'8'
	# Release AltGr
	WM_SYSKEYUP	VK_CONTROL
	WM_KEYUP	VK_MENU

Now since AltGr wasnt pressed when '8' was pressed, it came out as a regular '8' \
instead of infinity. Furthermore, whether Right Alt translates to Ctrl-Alt depends on \
the current keyboard layout of the thread currently holding the input focus, which \
rdesktop cant know about.

The attached patch just removes everything to do with tracking the remote modifier \
state. It generates the correct message sequence for the RightAlt+8 case, and all my \
mode-shifted keys work properly now.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=381349&aid=2123862&group_id=24366

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
rdesktop-devel mailing list
rdesktop-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdesktop-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic