Saturday, July 13, 2019

Better input method switch keystrokes under Windows?



I have 3 input languages installed and it is very annoying to change them with standard Windows keys because I am often overflow the language.



I would prefer to improve this. One improvement would be to make switch like in Ubuntu, where Ctrl-Right Shift switches "right" and stop at the end of language list and Ctrl-Left Shift switches "left" and stop at the beginning of a list.




But I don't see it is possible.



Also, probably better behavior would be like Alt-Tab behavior.



Is it possible to improve?



UPDATE



I know how to set change shortcuts in Windows, the problem is that options are very poor:




enter image description here



Most of these combinations are used in many popular programs like Google Chrome, so they are unusable.



And in switch choice:



enter image description here



there is no way to disable cycling and palette is very poor. Actually I can choose between Ctrl-Shift and Alt-Shift.




I emphasize: the entire setting of language switch is nearly unusable in Windows. Most of options are conflicting with other programs and overall functionality is extremely poor.



So the question persists: how to set my own combination, not limited to this strange choice by MS? Or how to do something what I described in question?


Answer



You could set the shortcuts using these poor options that are found in Windows,
then map them to your own additional shortcuts.



The tool for that is AutoHotkey, that can map keys,
but can also invoke general-purpose scripts that can do much more than mapping.

AutoHotkey can do all that you asked for.



There is extensive help to be found on the Web for writing AutoHotkey scripts,
but I can also give hints if you wish.



For example, if the shortcut to the first language is Ctrl+0,
while that for the third and last language is
Ctrl+2, then the following AutoHotkey
script will switch to the first language on entering
Ctrl+Left-Shift

and to the third language on entering
Ctrl+Right-Shift.



#InstallKeybdHook
^Shift:: ; map ctrl-shift
If GetKeyState("LShift") ; if left-shift
Send ^0 ; send ctrl-0
else ; else right-shift
Send ^2 ; send ctrl-2
return



AutoHotkey scripts are stored in files with the .ahk suffix.
If you wish to have the script run when Windows is started, put it in the Startup
folder, for example a file named
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\AutoHotkey startup.ahk.



Remark: I would in general counsel to not to map Ctrl+Shift,
since this disables some useful shortcuts.
For example, in many applications the select-word-to-left shortcut is

Ctrl+Shift+Left-arrow.



Further reading :




No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...