"Advanced Conditions" for keys?

@Andreas_Hegenberg I wonder why among all the useful "Advanced Conditions" there are none for keys.

For example: If "f" is pressed and held, then "j" and "k" become "Arrow left" and "Arrow right".

This would be very useful for navigating in a text. Is this not possible or have you not thought of it yet? :slightly_smiling_face:

1 Like

For which triggers would you want to set this as advanced condition? Keyboard shortcuts? Or key sequences? I think it would be pretty hard to implement for both, but maybe I first need to understand the use case.

Sure, in principle you could do everything with it, but I'm thinking especially of the navigation in a text.

If you write with all ten fingers you always want to keep the basic position. This


The arrow keys move the cursor left/right/up/down in the text. But they are not reachable without changing the basic position.

Ideal would be the following: "f" down and held (left index finger) and with the right hand "j" moves the cursor to the left and "k" to the right. And maybe "u" up and "n" down. There's no limit to how much this can be expanded.

I suggest a shortcut. With a key sequence it already works, but there is no key repetition. So I can't hold down "f" and "j" and the cursor goes to the left continuous. It only works step by step. Each step needs that both keys are pressed and released again.

That would be cursor to the left.

Does that make sense?

Such an "Advanced Condition" would be great, certainly not only for me. :slightly_smiling_face:

Andreas, du kannst die Sache oben vergessen. Ich habe eine Lösung mit der Taste „4“ gefunden. Die kann ich blind und sicher mit dem linken Zeigefinger erreichen.

„4“ gedrückt bewegt die Maus auf die Menüleiste. Dann (mit Advances Conditons) kann ich mit „j“, „k“ und anderen Tasten im Text navigieren. „4“ losgelassen und die Maus kehrt an den ursprüglichen Ort zurück und alle Buchstaben sind wieder, was sie waren.

Aber wenn du dir den Bug mit der Tastenwiederholung anschauen könntest, wäre das super.

Danke, dir und deiner Familie wünsche ich ein gutes 2023!

Have you used Karabiner Elements? I think that's more suited for things like this. They have a lot of ready made presets for something like this already if you look up emacs binding and some of their mouse keys (use keyboard keys for mouse clicks and movement when a certain key is held down).

Thank you @rishifter I think Karabiner does not work for me. To explain it with my example. If „f“ is pressed and held it should trigger an action in combination with "j". But "f" should also remain „f“when used alone. This is only possible if "f" is typed when release. This leads to twisted letters when writing fast.

My friend, this is exactly what's possible with KE. Although I have not used it myself in many years now, you may look at one such preset here.

You can set a single letter as a trigger/hyper key f in your example. You can use f as normal after the setup but if you hold it down and press other keys like H/J/K/L, it can be mapped to arrow keys as per the preset. You can of course map it to anything almost.

Here is the relevant KE knowledge docs.

Thank you, my friend :slightly_smiling_face:

Then I will certainly try this out. But I do not understand the logic.

If I press "f", how does KE know if another key follows?

Because if no other key follows, "f" should be typed? Otherwise not.

Edit: Ah, I think I understand, it depends on how long "f" is pressed, right?

Yes! Also, they have the order option for keyup and keydown also. So if you are a really fast typer, you can set that so that your modifier can come first or last in the combination. Based on your language and how the trigger letter appears in common words, you can decide to prevent the letters from accidentally triggering.

BTW this is just one preset example. You can check all of them and some have a separate modal system where you can press something like CAPS + f to trigger a different mode and then any single letter keys will work only as shortcuts until you toggle it back again to normal with CAPS + f.

sounds good! If possible I would also recommend Karabiner for such key remappings because it can work on a much lower level than BTT.

Thank you both ... I had a long night, my brain works slowly.... :slightly_smiling_face:

But it still seems logically impossible to me.

If KE waits how long "f" is pressed and held (to wait for another possible key to be pressed) then "f" must be typed when released.

Or how else should this work?

Edit: And BTT can do that too

short press "f", the letter is typed when released.

Advanced Conditons

Long press "f" (down) move mouse over menubar

Long press "f" (up) back to previous mouse position

And in between you can press a letter defined with Advanced Conditons.

Haha! At this point, I'd just suggest giving it a try. Just use the preset I shared and try and see if it works. And if it does, who cares how it works under the hood as long as one can tame it to do what one needs?

Haha, You're absolutely right, of course. But I don't have to fall into the water to find out that I then get wet. :grinning: