keymap and Xsync

viollet.benoit at free.fr viollet.benoit at free.fr
Sat Jul 17 13:31:47 PDT 2010


The following code:

  locale(LC_ALL,"");
  ...
  keysym = XKeycodeToKeysym (dpy, keycode,0);
  std::cout << (int) keycode << " " << (int) keysym << std::endl;
  XSync (dpy, False);
  keysym = XKeycodeToKeysym (dpy, keycode,0);
  std::cout << (int) keycode << " " << (int) keysym << std::endl;

gives
24 97
24 113

So, Xsync changes the keymap from "fr" to "us". But when I add at the beginning: system("setxkbmap fr"), it works.
24 97
24 97

What can I do ?

P.S. Sorry for my english.


More information about the xorg-devel mailing list