[Gambas-user] Desktop.SendKeys() and modifiers and layouts

Tobias Boege taboege at ...626...
Wed Aug 7 21:43:58 CEST 2013


Hi,

First thing:

Desktop.SendKeys() (gb.desktop) seems to have problems sending some keys
generated via the AltGr modifier (is the labelled AltGr on non-German
keyboards, too? I hope so).

Anyways, on a German keyboard we compose @ = AltGr+q, [ = AltGr+8, ] =
AltGr+9, etc..

But neither

Desktop.SendKeys("@")

nor

Desktop.SendKeys("{[Alt_R]q"}

gives an "@" but always "q" instead. It's the same for every other key I
tried. It always results in the "base key" being sent.

Does anyone not have this problem?

---

Second thing:

Moreover, I use a German keyboard layout and a (British) english locale. On
the German keyboard we have "-" where on an american keyboard the "/" key
is. If I, on my system, use

Desktop.SendKey("-")

it actually produces a "/" in the target window. How strange is that? Same
with the more prominent example of "z" and "y" because German keyboards are
qwertz and american ones are qwerty. I type "z" and "y" is sent...

Any thoughts?

Regards,
Tobi




More information about the User mailing list