I've written an AutoHotKey script which changes keyboard layout by pressing CapsLock.
Pressing CapsLock simply emulates "LeftAlt down + Left Shift + LeftAlt Up" combination.
It's obvious, that my program won't work if Control+Shift is set to keyboard layout change method.
I've tried searching over registry, but there's no useful information in HKLM/System/CurrentControlSet/Control/Keyboard Layout(s).
So, is it possible somehow to find out user's method to change layout?
Add a comment
|
1 Answer
Keyboard layout toggle
The information you're looking for is stored in the following registry key:
HKEY_CURRENT_USER\Keyboard Layout\Toggle
The key sequence is determined by the Layout Hotkey
value:
1 = Left Alt + Shift
2 = Ctrl + Shift
3 = Not assigned
4 = Grave accent
When the value is missing, that means the default setting is being used (i.e. Ctrl + Shift).
References
-
Well, I have no "Layout Hotkey" value there. Moreover, there're no values:(– GrooshaAug 6, 2014 at 22:23
-
@Kondra007 When the values are missing that means the default settings are being used (i.e. Left Alt + Shift to switch the input language, and Ctrl + Shift to switch the keyboard layout).– and31415Aug 7, 2014 at 7:34
-
@Kondra007 You're welcome. Keep in mind the user might use the Not assigned option, in which case there's not hotkey you can emulate. If that's an issue, you'll need to consider a different approach.– and31415Aug 7, 2014 at 12:11