Hi all,
I'm just digging into kbswitch and have several questions (later).
The major issue: kbswitch affects all windows at once, while it should change the input language only for the current (focused) window.
I assume that kbswitch must preserve the active window, so that it can know where to apply changes, and to re-activate that window when done. As I don't know what's already implemented, I wrote a simple test program, using
GetForegroundWindow() to determine the active window (hwnd),
GetWindowThreadProcessId() to get the related process handle, and
GetKeyboardLayout() to get the keyboard/language handle (hkl).
Tested on WinXP and ReactOS, the output looks correct. The hkl seems to be composed of two words (hi: language and low: layout), which are always the same on ReactOS. On XP a different keyboard layout can be used for a language, but I cannot decipher the resulting encoding of the layout. As soon as I try to change the layout for a language on ReactOS, kbswitch shows the *layout* name, not the *language* name.
Q: Can somebody try to find out how to convert a HKL into language and layout id's and/or names? (see GetLayoutIDByHkl)
Q: Is kbswitch notified of focus changes, and if so: how?
Then above sequence can be used to identify the related thread's setting, and update the tray icon and menu accordingly.
Q: Is every process/thread already assigned a *private* hkl?
If not, this feature must be implemented before further updates.
So much for now
DoDi
_______________________________________________
Ros-dev mailing list
Ros-dev@reactos.org
http://www.reactos.org/mailman/listinfo/ros-dev