How does Default Input Language Switcher work in Windows?

95 views Asked by At

Default input languages switcher listens for key strokes and changes input language of any application. How does it happen? Does it use DLL injection as described in comments here https://stackoverflow.com/a/1261532/258483 or there are any other means?

1

There are 1 answers

0
kichik On

I'm not sure that's how the switcher does this, but if you want to do something similar for your application, you can use RegisterHotKey.

BOOL RegisterHotKey(
  HWND hWnd,
  int  id,
  UINT fsModifiers,
  UINT vk
);

It allows you to ask for a notification when a certain combination of keys is hit, no matter what window has focus.