Use any key to switch between input input layouts (informally speaking, 'languages').
The list of switched languages is confined to only two recent languages even if the system has more than two languages.
For example, your system has the following languages installed:
- English (US)
- Ukrainian
- Chinese (Simplified)
- Thai (Kedmanee)
and the current keyboard layout was English,
and the application is called with the following Parameters:
lswitch.exe 20 0x409 0xa0
(meaning CapsLock, English, and LeftShift).
Then pressing CapsLock would cyclically switch between English and Ukrainian.
Pressing LeftCtrl + LeftShift to switch to Chinese.
Then pressing CapsLock would cyclically switch between English and Chinese.
Pressing LeftCtrl + LeftShift to switch to Thai.
Then pressing CapsLock would cyclically switch between English and Thai.
Then pressing CapsLock would do:
- if the current language was anything but English (e.g. Thai),
lswitchwould change to English and remember Thai as last non-English layout; - if the current language was English (any layout),
lswitchwould change the layout to last remembered non-English layout (see above).- if nothing known about the non-English layout
(e.g. the
lswitchhas just been started), the next available layout will be chosen;
- if nothing known about the non-English layout
(e.g. the
- if with
LeftShift, normalCapsLockstate will change
To chose the non_English layout, simply use your Windows standard
hotkey (e.g. LeftCtrl+LeftShift). Then
lswitch [keycode [default_layout [guard_keycode]]]
lswitch q
Each parameter may take decimal (42) or hexadecimal value (0x123ABCD).
keycode(optional):integer.
Which key to use for keyboard switching.
Default:0x5dcontext menu key.
Another good candidate is a CapsLock key with a keycode of20.default_layout:ulong.
Default:0x409(English)
Specifies which language is 'main' for the systemguard_keycode:ulong.
Default:(not set)
Which key is to use for 'normal' operation of thekeycodekey.
This is useful in combinations likeCapsLockandLeftShiftso that pressingCapsLockwould change the layout, but pressingLeftShift + CapsLockwould act as normalCapsLockoperation.q: finds the running instance oflswitchand lets it close
lswitch is intended to have a low memory footprint.
The Release version .exe is only 5 kb in length.
Forked from valodzka/lswitch .
Adapted haali.cs.msu.ru/winutils .