Sequence of keys to trigger an action

Hi all,

I’m not sure if this is possible. I want to put all my window commands (e.g. move to left / right of screen) behind a sequence of commands. So I want to press Fn-W for window mode, and then if I press H it goes to the left, if I press L it goes to the right… It’s inspired by my vim setup which does something like this.

I’m not sure if this is possible or not with the command macros?



1 Like

Hard to tell if you don’t tell us which key sequences you want your UHK to produce ¯\(ツ)/¯.

(Or, to be more precise and answer exactly what you have asked: “Yes, I am pretty sure it is possible.”)


Umm, sorry, maybe I wasn’t clear. So I want to press Fn-E (imagine that’s activated a window mode). I’d then release these keys. Then If I press H I want that to move the window to the left - I’m less bothered about "how to move the window to the left - I just need to send a certain chord (Shift-Mod-LeftArrow). It’s the bit about how can I make it activated by first Fn-E, and then H.

Does that make sense?

Oh I see, sorry, I should have understood that from the first post.

One way:

  • fn+e to toggleLayer fn2
  • fn2+h to
tapKey LSLG-leftArrow

Another way:

  • fn+e to oneShot holdLayer fn2
  • fn2+h to tapKey LSLG-leftArrow

Yet another way:

  • fn+e to:
ifGesture 21 final tapKey LSLG-leftArrow
ifGesture 15 final tapKey LSLG-downArrow
ifGesture 16 final tapKey LSLG-upArrow
ifGesture 17 final tapKey LSLG-rightArrow

That’s great, thanks. The ifGesture looks like a nice solution to me, I’ll go with that one :slight_smile: