Effective CapsLock
Eray Kaya
Posted on March 3, 2021
When I first start to think about how to get more efficient in using my text editor, I realized that when I both navigate and edit files at the same time I have to move between keys which are far from each other. For example; arrow keys and any other letter key.
Then I thought that, the least useful key for me was caps lock. So I come up with a solution by using autohotkeys. I wrote this script to separate navigate mode and editing mode, like in VIM but much simpler. Here is the script:
#Persistent
SetCapsLockState, AlwaysOff
; Caps Lock Disable
#If GetKeyState("CapsLock", "T") = 0
;;; [CapsLock] + [i] - move up
Capslock & i::Up
; ...
;;; [CapsLock] + [l] - move right
Capslock & l::Right
; ...
;;; [CapsLock] + [k] - move down
Capslock & k::Down
; ...
;;; [CapsLock] + [j] - move left
Capslock & j::Left
; ...
;;; [CapsLock] + [;] - move far right
Capslock & `;::End
;;; ...
;;; [CapsLock] + [h] - move far left
CapsLock & h::Home
;;; ...
;;; [CapsLock] + [n] - enter
CapsLock & n::Enter
;;; ...
;;; [CapsLock] + [d] - delete
CapsLock & d::BackSpace
;;; ...
;;; [CapsLock] + [w] - pageup
CapsLock & w::PgUp
;;; ...
;;; [CapsLock] + [x] - pagedown
CapsLock & x::PgDn
;;; ...
Basically what this script does is that; when capslock is pressed you can use:
j as left arrow
i as up arrow
l as right arrow
k as down arrow
n as enter button
d as backspace
w as pageup
d as pagedown
h as home // to go to the beginning of the line
; as end // to go to the end of the line
Now it feels more intuitive and effective to navigate and edit files. Let me now in comments if it worked for you or not or maybe you have better approach.
Posted on March 3, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 25, 2024
November 21, 2024