Thema: Delphi keyboard layout

Einzelnen Beitrag anzeigen

Olli
(Gast)

n/a Beiträge
 
#4

Re: keyboard layout

  Alt 8. Jan 2007, 10:41
If you ask me, other ways seem just as "dirty" as the first. However, what you can possibly do is to hook the input and wait for your "hotkey". Then, as soon as the hotkey gets pressed, you send input to the current window and in the context of the current process. This should suffice to switch the language. However, you'll have to have a way to check the current input language, you'll need a way to enumerate existing layouts and a way to check which system-wide setting exists for the input language switching hotkey (so you send the right one). All in all quite much for such a simple functionality.

Another method could be (for Unicode text fields in other apps) to inject the DLL and subclass the control (i.e. the text field) so that you can manipulate the respective messages ... was it WM_CHAR and WM_IME_CHAR?!
  Mit Zitat antworten Zitat