📜 ⬆️ ⬇️

Keyboard hack for easy text navigation

From the first years of college I was interested in the topic of man-machine interfaces - the interaction of man and machine. Not much that surrounds us comfortably or ergonomically, but by virtue of the standard is more common. One of these devices, I think the keyboard. No, I'm not going to criticize the qwerty-layout, I’ll approach the question more broadly. In particular, the location of the block of digital and positional keys to the right of the letter part is very inconvenient, and making the control keys is also not the best idea.
I will not spread the idea of ​​the tree, and move on to the point. It took 1.5 days to make a lot of edits to the long-written code, and the constant transfer of the hand from the arrow keys to the letter keys was, to put it mildly, boring. The thought came: it would be more convenient if the cursor keys were on the letter part of the keyboard. Yes, the idea is not new, but from those solutions that are (including the Emacs keyboard shortcuts), I didn’t like anything - it’s not convenient.
After some thought, this sketch appeared:
image

The last option was comfortable and practically did not require memorization.
Pressing two or more modifying keys is not convenient, so I used CapsLock (I used to use it to launch Enso Launcher, now to switch bookmarks with Punto Switcher). The arrow keys occupy the letters I, K, J, and L; Del, Home, End, PageUp and PageDown - O, P, “;”, [and 'respectively. I don’t use Insert'om and didn’t move it, giving preference to BackSpace, placing it on the keys of the letter U. I also took into account the movement of the cursor while pressing Shift to select text. And simultaneously pressing both Shifts now changes the layout of the last word entered - the Break hotkey in Punto Switcher is too lazy to reach it. Thus, we get an extension of the CapsLock functions and easy navigation through the text without transferring a hand on the keyboard. By the way, the layout, when pressed simultaneously with the caps of the keys, remains the same as before pressing, a single press remains - changing the layout.
List of shortcut keys:
CapsLock + I - move the cursor up
CapsLock + K - down
CapsLock + J - left
CapsLock + L - right
CapsLock + P - Home
CapsLock +; - End
CapsLock + [- Page Up
CapsLock + '- Page Down
these keys also work with Shift pressed: CapsLock + Shift + I (and so on).

CapsLock + O - Del
CapsLock + U - BackSpace
LShift + RShift - Break
')
Why is this option convenient?
I type the text using the 10'-finger method, and in the process of typing my hands remain in one position above the keyboard. In this case, the cursor is controlled up and down - with the middle finger, and left-right - with the index and ring fingers, just like on ordinary keys (I asked my colleagues specifically - they did not name other options). The location of the rest is like on native keys (except for Del and Backspase, I think it's easy to remember them). CapsLock is pressed with the little finger of the left hand. Everything is done without shifting hands.

The idea of ​​the idea, but without implementation - it is only paperwork. To implement the above described functionality, I wrote a simple script executable by the program AutoHotkey. The script itself:

CapsLock & +VK49:: ;key i
GetKeyState state, Shift
if state = D
Send {Shift}+{Up}
else
Send {Up}
Return

CapsLock & +VK4b:: ;key k
GetKeyState state, Shift
if state = D
Send {Shift}+{Down}
else
Send {Down}
Return

CapsLock & +VK4A:: ;key j
GetKeyState state, Shift
if state = D
Send {Shift}+{Left}
else
Send {Left}
Return

CapsLock & +VK4C:: ;key l
GetKeyState, state, Shift
if state = D
Send {Shift}+{Right}
else
Send {Right}
Return

CapsLock & VK50:: ;key p
GetKeyState state, Shift
if state = D
Send {Shift}+{Home}
else
Send {Home}
Return

CapsLock & VKBA:: ;key ;
GetKeyState state, Shift
if state = D
Send {Shift}+{End}
else
Send {End}
Return

CapsLock & VKDB:: ;key [
GetKeyState state, Shift
if state = D
Send {Shift}+{PgUp}
else
Send {PgUp}
Return

CapsLock & VKDE:: ;key '
GetKeyState state, Shift
if state = D
Send {Shift}+{PgDn}
else
Send {PgDn}
Return

CapsLock & VK55:: Send {Backspace} ;key u
CapsLock & VK4F:: Send {Del} ;key o

LShift & RShift:: Send {Pause}


I didn’t write a script for Linux (I’m not very good at it yet), if someone finds this idea interesting and implements it for Linux, I will be grateful. I use this solution the second day and I am very satisfied - it is convenient. I plan to expand the functionality. I took the picture for the sketch from the site nabiraem.ru with the permission of the site administration.
Thanks for attention.

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


All Articles