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 [email protected] http://lists.freedesktop.org/mailman/listinfo/xorg
