Re: Rdesktop and keymap vs kxkb interraction?

"Fortier,Vincent [Montreal]" <[email protected]>
Newsgroups gmane.network.rdesktop.user
Message-ID <F1D642E5A91BC94D9504EC83AE19E6B0B896AB@ecqcmtlmail3.quebec.int.ec.gc.ca>
Finally found a proper fix to make things working properly.  One of the biggest issue is the fact that you can select between two different french keyboard layouts in both linux and windows (a 2-key or 2-key pressed accentuated character)... hence, depending of you keyboard mapping in linux vs windows your keymapping in the windows Terminal session gets easilly screwed up.
 
We have found a way to make the keyboard working in either US, ca (ca in KDE and french canadian traditionnal in windows) or cae (ca enhanced in KDE and french canadian in windows) in any of the two environment.
 
1- Set the windows registry to ignore the remote keyboard layout (be sure to apply this patch first: http://support.microsoft.com/kb/842136)
Windows Registry Editor Version 5.00 
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] 
"IgnoreRemoteKeyboardLayout"=dword:00000001
 
2- Fix rdesktop 1.5 keymapping to allow proper mapping independly of the selected french canadian keyboard:
[root@nuage keymaps]# sdiff -s common-1.5 common
sequence egrave dead_grave e                                  | #sequence egrave dead_grave e
sequence Egrave dead_grave E                                  | #sequence Egrave dead_grave E
sequence eacute dead_acute e                                  | #sequence eacute dead_acute e
sequence Eacute dead_acute E                                  | #sequence Eacute dead_acute E
sequence agrave dead_grave a                                  | #sequence agrave dead_grave a
sequence Agrave dead_grave A                                  | #sequence Agrave dead_grave A
sequence ccedilla dead_cedilla c                              | #sequence ccedilla dead_cedilla c
sequence Ccedilla dead_cedilla C                              | #sequence Ccedilla dead_cedilla C
sequence apostrophe dead_acute space                          | #sequence apostrophe dead_acute space
 
[root@nuage keymaps]# sdiff -s en-us-1.5 en-us
apostrophe 0x28                                               | #apostrophe 0x28
quotedbl 0x28 shift                                           | #quotedbl 0x28 shift
 
3- call rdesktop by forcing the en-us keymap.
 
This way, independly of the active keyboard in KDE I get the proper keyboard mapping under Windows in the terminal sessions.
 
The only bug I've found so far is when using a canadian french traditionnal keyboard in windows (meaning a 1-key accentuated character) the upper left key (left of the 1 key) is mapped as ° and ¬ characters instead of # et | ....  but for the rest of it, it works like a charm.
 
- vin
 
 


________________________________

	De : [email protected] [mailto:[email protected]] De la part de Fortier,Vincent [Montreal]
	Envoyé : 2 octobre 2007 08:46
	À : [email protected]
	Cc : Desjardins,Marc [Montreal]
	Objet : [rdesktop-users] Rdesktop and keymap vs kxkb interraction?
	
	

	Hi all, 

	SHORT STORY: 
	We are trying to figure out a way to dissociate the interraction between "KDE keyboard switcher" vs "rdesktop using keymaps" to make sure that when we can fire-up a rdekstop using either a ca-fr or en-us keymap and that the keyboard will keep that mapping independently of any keyboard mapping switch in the KDE session.


	LONG STORY: 
	We are having a scientific department with around 75 linux desktops.  Every user as a connetion to a terminal server to read it's emails and use the official office technology supported suite (a.k.a ms office).

	People can either work in english or french which mean that they can easily configure their KDE session language and have keyboard switching available using kxkb.

	Almost every single forecaster applications they use only handle US ASCII characters thus they mostly (if not only) use en_US keyboard mapping on thoses applications.  Although, on some other they might switch keyboard mapping (like for bloggin in firefox for instance).

	They can also either connect to a english or french terminal server and thus use either an english of french keyboard mapping for it.

	This is where the problem begins... Using linux only applications it's quite easy to switch language for one application to the other using kxkb global, per application or per window feature.  The problem is it's interraction with rdesktop.

	Doing a lot of testing under Debian we found out that: 

	Without keymap and LC_ALL set to POSIX: 
	Version 1.5: The mapping of the keyboard in the windows terminal session is affected by kxkb (kde keyboard switcher) wich meands that, having set the keyboard in french in the terminal session and switching from us to ca or cae in KDE doubles the accentuated characters (for instance, é becomes ée) in the windows sesison.  It also generates errors on the prompt when we switch to another language then us in KDE:

	WARNING: No translation for (keysym 0xfe51, dead_acute) 
	This results in:  if the keyboard in KDE is set in us then french accents works ok in TS.  If the keyboard in KDE is set to ca or cae then accentuated characters gets doubled (é becomming ée).

	Version 1.4: The mapping of the keyboard is not affected by keyboard switching in KDE which means that a switch from us to ca or cae in KDE make no difference in the windows terminal session keyboard mapping.  Although, it does generate the same errors at the console than the 1.5 version.

	In both cases (1.4 & 1.5 versions) the terminal session is started by default with an english keyboard mapping everytime and even if the user change its default keyboard preferences to french canadian it will be resetted at next logon.



	With a ca-fr keymap or LC_ALL set to fr_CA / fr_CA.ISO-8859-1: 
	The terminal server session always get started with the proper keyboard mapping (this means that the blue windows keyboard icon is set to FR).  Although, the keyboard in KDE MUST be set to either ca or cae to allow french accentuated characters.  If the keyboard in KDE is set to us the keyboard will be mapped to US in TS although the keyboard layout icon is set to FR ???


	Desired behaviour: 
	1- We hope we could easilly start a windows terminal session using rdesktop directly using the appropriate keymap (passing either en-us of fr-ca keymap thus resulting in having a EN or FR blue icon at login screen and proper keyboard set by default in the windows session.  This can already be done.

	2- Making sure that rdesktop will keep typing the appropriate characters when I type which would mean that rdesktop wouln't be affected by any keyboard switching (that could lead to a new option a rdesktop startup ?).  To do so I'm presuming that if I start rdesktop using a french keyboard mapping that this mapping will stay that way in my TS independently of my KDE session.  That would mean a pseudo-equivalent of the version 1.4 behaviour as described previously.


	Vincent Fortier 
	Informatique 
	Environnement Canada

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

_______________________________________________
rdesktop-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdesktop-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.