Faster, More Ergonomic Keyboard Shortcuts and Macros

in shortcuts •  4 years ago 

This article shows how to set up better shortcuts for common actions and provides some clever macros for programmers.

Before you start making shortcuts, you need to know your modifier key options: Ctrl, Shift, Alt, Super (or whatever), Hyper, and Meta. The last two are useful because shortcuts that use more common modifiers like Ctrl can run into conflicts with established shortcuts.

keyboard.jpg

Oh, your keyboard doesn’t have Hyper or Meta? Wow, lame.

Okay, just remap Caps Lock to Hyper (for Linux users, use Gnome Tweaks). The keyboard shortcuts below assume that you have done so. They wouldn’t make ergonomic sense otherwise. You can consider remapping something to Meta as well, but Hyper should be enough.

I also suggest swapping Left Alt and Left Super (Gnome Tweaks can do this too) because Alt is a closer reach from normal resting keyboard position. The easier shortcuts are to reach from this position, the more valuable they are. This is why I suggest replacing hard-to-reach shortcuts for common actions like copy and paste with faster more ergonomic alternatives. Left-handed shortcuts are also more valuable because your right hand might be using the mouse.

You can find the code for the following keyboard shortcuts (along with others) at my Github repo. The code is built for use with AutoKey for Linux only.

Keyboard Shortcut Effect
Hyper + A Jump to beginning of line
Hyper + S Jump to end of line
Hyper + W Single tap: copy highlighted text, double tap: highlight word and copy, triple tap: highlight entire line and copy
Hyper + E Paste
Hyper + F Find
Hyper + G Next item in find
Hyper + D Highlight and copy URL in browser
Hyper + Q Backpage in browser
Hyper + ‘ Esc
Hyper + J | K | L | ; Move cursor left | down | up | right
Super + J | ; Switch tabs left | right
Super + K | L Move up | down workspace
Super + S Save
Super + Z Undo
Super + Backspace Delete line
Super + W Single tap: open new tab, double tap: open new window
Super + Q Single tap: close tab, double tap: close window

Macros

Macros replace sequences with other sequences. For instance, when I type ‘/em’, Autokey automatically replaces it with my email address.

As a programmer, I type these characters often: +=_(){}. They are hard to type, so I created macros that generate them from double letter sequences that are rare in English:

Phrase Replacement
jj ()
kk =
uu _
ii {}
;; :
hh +
/em Email address
/cl console.log
Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!