📜 ⬆️ ⬇️

Keyboard for PHP programmer

By occupation, you have to do PHP programming, not the ultimate dream, but you can live :) For the same reason, you often have to type the $ symbol (dollar), from which the variable name begins. It always seemed inconvenient for me to stretch my fingers on the Shift + 4 keys to type this character. In general, disgusting usability.


A natural question arose, is it possible to use another key combination? And is it possible to change the functions of individual keys? For example, I’m annoyed by the Caps Lock button right above the left Shift - I miss it all the time.

It turned out that in Windows starting from version 2k / XP there is a way to configure the keyboard through the registry.
The essence comes down to assigning the scan code of one button to another (Scan Code Mapping)
')
What is needed?
1. $ (dollar) character set using Shift + Caps Lock combination (By the way, it turned out to be very convenient)
2. Reassign Caps Lock to Num Lock. (I do not remember when I used it)

What should be done?
Open the key in the registry (not to be confused with the Keyboard LayoutS):
HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Keyboard Layout

Add a new parameter of type REG_BINARY with the name Scancode Map and add the value of the parameter as indicated in Figure 1

Fig.1 Scancode Map parameter value Scancode Map Value

Pay attention to the sequence of numbers 05 00 3A 00, these are the scan codes of the “4” and “Caps Lock” keys, respectively. So, first - what we want to get, then - on which button we want to get. To disable a key, you need to fill the first 2 pairs of digits with zeros. (for example: 00 00 05 00 - disables the "4" key)
After that, a computer restart is required

And in general, there are multimedia keyboards, why not develop the idea of ​​a keyboard for programmers. So that, for example, the "$" sign or the "->" construct were generally on single keys. Perhaps there is a software solution, you need to explore the topic.

References:
Keyboard Scan Code Specification
Scan Code Mapper for Windows

Source: https://habr.com/ru/post/22281/


All Articles