Donate Share

X11::GUITest

The forum address has changed, you have been automatically redirected. Please update any bookmarks to use the new URL.

Subscribe

Weird behaviour with SendKeys, bug?

You are viewing a single message from this topic. View all messages.

  1. 2008-10-16 18:01:09 UTC
    Sorry for the flood but I've got news once again. :p

    1) The keys that one needs to press multiple times are called "dead keys".

    2) SendKeys failed at GetKeycodeFromKeysym where XKeysymToKeycode returned 0, since there is no single keycode for ^ in the Finnish/Swedish layout.

    Earlier in the code, keysym was set to 94 form the pre-set table since XStringToKeysym returned "NoSymbol". However, in the Finnish/Swedish layout, keycode 94 is <. I don't know why XKeysymToKeycode didn't return that one instead of 0, though.

    Writing a patch for this turned out to be harder than I originally thought, especially when I have *very* little experience with Xlib from before, so I had to settle on a workaround that I found. The following code produces a single carot in the Finnish/Swedish layout:

    PressKey('LSH');
    PressReleaseKey('dead_circumflex');
    PressReleaseKey('dead_circumflex');
    ReleaseKey('LSH');

    I'd really appreciate if somebody could write a patch to implement the dead keys in X11::GUITest, but until then I have to settle with the workaround.

    Cheers,
    Joeli
< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.