[bug?] Keyboard accelerators fail to initialize with non-latin keyboard layout at programm start



== Problem ==

It seems that keyboard accelerators are not initialized if GTK
application starts when non-latin keyboard layout is set to default in
OS settings.  Application starts but all hotkeys are ignored even when
switching back to English.  When defaut keyboard kayout is English,
hotkeys keep working after switching to different keyboard layout (as it
should be, I believe).

I tested with Russian keyboard layout on Windows XP SP2.  PyGTK was used
to create an application.

== Some notes ==

1. All accelerators are affected, even language-independent like "Alt+1"

2. Tipping point is within first few seconds after GTK main loop
starts.  Layout changes that happen before or after that does not affect
accelerator behaviour.

== Workaround I use ==

Rememer original keyboard layout during application init phase, change
to English, start GTK main loop then revert keyboard layout to original
using 2-second timer.  Timeout is essential, using anything less than 1
second does not solve the problem or do this randomly in some part of
launches. The code doing the trick is not very clear, smells bad and is
platform-specific.  I would definitely be happy to find a better solution.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]