AltBacktick icon indicating copy to clipboard operation
AltBacktick copied to clipboard

MapVirtualKey returns different keycode depending on the language

Open gbogarinb opened this issue 4 years ago • 1 comments

If I run the program with spanish layout I get key code 220, in english I get 192.

gbogarinb avatar Nov 18 '21 15:11 gbogarinb

Hello,

When you change your keyboard layout while the app is running the shortcut is still mapped to the old key code, that's why it doesn't work. AFAIK there is no easy way to detect it, the message WM_INPUTLANGCHANGE is only sent to the active window.

As a workaround, you can restart the app in order to detect the correct key code after changing the keyboard layout.

akiver avatar Jan 28 '22 12:01 akiver