How can I refresh keycode to keysym mapping?

Edward marslee_suc at 163.com
Wed Apr 8 06:35:25 PDT 2009


Hi,
Thank you very much. That must be the solution,but I am developing a QT application how can I listen MappingNotify ? I think all events will be sent to QT I don't know how to catch it
 
BR,
 
Edward.




2009-04-08,"Julien Cristau" <jcristau at debian.org> :
>On Wed, 2009-04-08 at 13:30 +0800, Edward wrote:
>> Hi all,
>>  
>> I want to get keysym with XKeycodeToKeysym method, but I found when I change keyboard layout using setxkbmap –layout 
>> in another process, The XKeycodeToKeysym return the old layout keysym.
>>  
>> For example:
>> Firstly, I run “setxkbmap –
>> layout us”. I get “z” for XKeycodeToKeysym(disply, 52,0), then I run “setxkbmap –layout de” in 
>> another process I also get “z” for XKeycodeToKeysum(display, 52,0). I think it should return “y”. It seems that I omit to update 
>> key mapping, but I don’t know how to update it immediately in my code. 
>
>As a first guess, make sure the app listens for MappingNotify, and calls
>XRefreshKeyboardMapping() when it gets that.
>
>Cheers,
>Julien
>_______________________________________________
>xorg mailing list
>xorg at lists.freedesktop.org
>http://lists.freedesktop.org/mailman/listinfo/xorg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg/attachments/20090408/6c345733/attachment.html>


More information about the xorg mailing list