The method proposed by me is not something unique and / or unknown. In any of the two search engines, you can easily find a lot of notes on how to configure Windows to switch the input language using any keyboard button, just like in Linux, only slightly more complicated and rebooting. However, I did not find
(here you can correct me and offer a link in the comments) a ready-made instruction that includes such an important point as saving the letter
E , as well as the reverse apostrophe with a tilde. I offer you such instructions.
The essence of the problem
Windows 7 provides the user with the long-awaited ability to switch input languages ​​by the reverse apostrophe:
It would seem convenient, but no. Personally, I see the following disadvantages:
')
- small key
- on the home Linux machine, however, CapsLock is configured
- missing the letter E
- lost tilde and reverse apostrophe
For those who, like me, are doomed to go to the develop / production server using PuTTY, the loss of tilde and reverse apostrophe is very sensitive. I could not stand a month, although it would seem, how easy it is to remember Alt + 126 and Alt + 96. Need to do something!
Change scan codes
The solution for switching layouts by CapsLock is redefining scan codes through the registry. There are many descriptions of how to do this. I can offer to read one of them at the link:
www.howtogeek.com .
The finished result looks like this (file SwitchLangByCaps.reg):
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Keyboard Layout]
"Scancode Map" = hex: 00,00,00,00,00,00,00,00,00,0,00,00,00,29,00,3a, 00,3a, 00,46,00,56,00 , 29,00,00,00,00
As you can see, one or several rules of substitution of the form are registered in the registry:
< , >< >< , >< >...
So we need to plan the permutation algorithm. The first permutation is obvious - by pressing CapsLock (0x3a) to emulate a click on E (0x29). The second one is also approximately understandable - in order to leave the functionality of the caps, it is necessary to reassign some unnecessary key to it. In my example, this key was ScrolLock (0x46). But the third permutation is responsible for saving the letter . For this tricky code, we need an "unnecessary key" from the text keyboard, Pause / Break will not work. However, here we are lucky. Even on the fully-functioning Russian-language keyboard layout there are duplicate keys:
This button in the lower left corner is suitable for replacing the letter E, as well as a tilde with a reverse apostrophe. It has a scancode 0x56 and is absent on most keyboards, so that it will be emulated by pressing the E-button.
At this stage, you can make changes in the registry and send the machine to reboot.
Adding layouts
As you can guess, after rebooting, instead of the letter E, we get a slash. To correct the situation, you need to correct the existing keyboard layout. You can edit keyboard layouts using the
Microsoft Keyboard Layout Creator 1.4 utility. Using the program is easy - load the original keyboard from the list, make changes (change the characters of the 0x56 key to the required letters ), save the source file and collect the installation package from the Project menu.
The same operation should be done with the English keyboard, changing the behavior of the backslash to the reverse apostrophe and tilde.
As a result, you should get two folders with the installation package for keyboard layouts. Install each by running setup.exe and proceed to the next step.
Layout Customization
Open the "language settings". To begin with, set the switch layout on the Grave accent, as shown in the first picture of this article. Then add the newly installed layouts: US-Custom and Russian-Custom. Finally, set the default entry via US-Custom. This is necessary, since the US layout cannot be deleted, but this also has a plus - now when you change the input language, the icon size in the system tray changes and it is much easier to notice if you hit CapsLock or miss. The result should look something like this:
If everything went well, then you got the opportunity to switch the input languages ​​via CapsLock, without paying anything substantial for it. You can safely buy the same keyboards at the office and at work, and without thinking more about the switching algorithm, get double the pleasure from the blind ten-finger print.
application
Ready draft layouts, their sources and patch to the registry can be found at the link:
Ya.Disk .
Note
Tested on win7 and win10. On 10-ke, already compiled projects were used, the link to which is given above.