Here are some Karabiner-element actions I've put together. I've done it with the wonderful tool Karabiner.ts, and my index.ts file is in this repo, if you want to check it out.
I have two versions of turning R
and U
into the Meh key (which is Shift + Control + Option
) if they are held down.
In Karabiner-Elements settings, you can set the threshold for how long you must hold a key for it to be registered as being held down, and not just tapped. A pretty normal threshold, is 200 ms. So, if you have that threshold and the Mey key action installed, it would work like this:
- Input: Press down (just)
R
, and release it before 200 ms.- Output:
r
- Output:
- Input: Press down (just)
R
, and release it after 200 ms.- Output:
Meh click
- Output:
- Input: Press down
R
, and then hitA
before releasingR
and before 200 ms.- Output:
ra
- Output:
- Input: Press down
R
, and then hitA
before releasingR
, but after 200ms.- Output:
Meh + A
- Output:
The default threshold is 500 ms, which is very long. You change it here: ๐๐ป
Having it higher, means you have to wait after holding, before hitting the second part of the hotkey. But having it lower will lead to more misfirings - like if you just meant to type "react", but you held R
and E
together for some milliseconds, so you sent the command Meh + E
.
The better you are at just giving the keys a little peck while you type, the lower you can have the threshold (and thus wait less).
While testing, it could be a good idea to use Karabiner's EventViewer. ๐๐ป
- I have one version, where the threshold of the meh keys will follow the default you've set,
- and another version with the treshold set to 220 ms even if the other keys have a lower threshold.
The most important one for me, is having Caps Lock
, and Quote
(ร
on Norwegian keyboards) become the Hyper key. That means all four of Shift+Control+Option+Command
. No apps use this for hotkeys, so you can always make them your own.
- I have one version that makes
Caps Lock
always be Hyper, andQuote
be hyper if you hold it longer than your to_if_held_down_threshold, - and another version that keeps
Caps Lock
's function if it's clicked alone and under your threshold.
What if you're a filthy pleb, like me, who don't know vim motions, but still want to move slighlty faster with the arrow keys?
Doing Command/Option + Arrows works great when going left to right, but not so much up and down. So, I present to you, my latest "invention": Turbo Arrows
If you hold the Meh key and git an arrow, it does 5 arrow clicks. And if you hold Hyper, it does 10. (I'll mostly be using it for up and down, but I added left and right as well.)
Typing _ and * requiers modifiers on (at least) Nordic keyboard layouts. So this little action is designed to make typing those easier.
(PS: I'm Team Single Underscore for Italics and Double Asterisks for Bold. ๐ช๐ป)
We don't use the key to make ยจ
often, as we have designated letter keys for ร ร ร
/ ร ร ร
. So, I've sacrificed it to do this instead:
- On tap:
_
- On hold:
**
- With Shift + Option or Meh: Regular unmodified function
Using the key with modifiers works like normal.
There's an excellent guide here, with tons of information and usage tips. But the gist of it, is that the keys on the home row (usually A
, S
, D
, F
and J
, K
, L
, semicolon
) becomes modifiers (like shift and control) when held down.
The same principles apply here as for the actions above - so you got to find the right threshold for you.
The most common way to activate home row mods, is by changing your keyboard's firmware, via QMK or ZMK. One of the major benefits of this, is that it allows some more advanced features, like permissive hold, ignore mod tap, and being able to map keys to change thresholds.
But there are two main benefits of doing it through Karabiner-Elements:
- It works on any keyboard, including internal laptop keyboards,
- and it has less lag while typing (I greatly prefer the typing feel).
I have one version, where:
- A -> Control
- S -> Option
- D -> Shift
- F -> Command
- ... and mirrored on the other hand.
And one version where:
- A -> Control
- S -> Option
- D -> Command
- F -> Shift
- ... and mirrored on the other hand.
But I have two versions with the same order as regular keyboards, so:
- A -> Shift
- S -> Control
- D -> Option
- F -> Command
One regular version, and one version with sticky shifts.
Sticky shifts mean that if you hold A
or semicolon
and then click something else, you'll get the shifted version even if was before 200 ms. This mimics the Permissive Hold function of QMK - but not perfectly (as that's not possible in Karabiner-Elements). The upside is that you don't need to wait for shifts - but it'll lead to more unintended activations, and you can't keep holding and get more shifts afterwards.
A better solultion, if you really want fast shifts, might be to just have a lower threshold on just those keys.
Holding several modifiers also works, btw! But you have to start holding them at the same time. simultaneous_threshold_milliseconds
is how strictly you have to hit them at the same time.
Good luck! ๐ค
-Erlend