bestoforeo.blogg.se

Hammerspoon rapid fire script
Hammerspoon rapid fire script













hammerspoon rapid fire script

With this Karabiner recipe enabled, you press a hyper key and then h/j/k/l to move the cursor left/down/up/right. In order to to try out global vi mode w/Karabiner, I had to sacrifice hyper+k from the Spectacle cheatsheet and switch that to be right-option+k.Īdditionally, tab can be rigged up to act as a modifier in conjunction with the hyper key to enable quick access to home/end/pgdn/pgup – which is especially awesome when you are on a laptop keyboard. I dug deeper and deeper into the Hammerspoon ecosystem, looked at more custom Karabiner and Hammerspoon settings, and heard some feedback from my first post. Hammerspoon is an application you run in the background that loads custom Lua scripts to interact with your system, allowing you to script behaviors to react to system events. For our purposes here, we're exploring Hammerspoon primarily in the context of using it to react to keyboard shortcuts and trigger something in response. FryJay's MenuHammer - "A Spacemacs inspired menu system".?Ī unit of re-usable scripting in Hammerspoon is called a 'spoon'.Īfter trying out many different spoons and customizations, two projects really caught my eye: Keep in mind we're talking about system-wide key bindings here – not something isolated to a single application. Jason Rudolph's Karabiner+Hammerspoon setup which focuses on home-row centric shortcuts for cursor navigation and window managment (ht: about these in terms of the capabilities they enable relative to the caps-lock hyper key and Spectacle cheat sheet via a shortcut that we put together in the previous post, it seems there is a lot of potential.A quick, customizable, nestable, menu system you can access via a system-wide keyboard shortcut. Karabiner can enable key chords too, but I found the nuances of getting it implemented well in Karabiner, for alpha keys, with the current version, to be painful.

hammerspoon rapid fire script

So, the aforementioned JR's setup has a 'super duper' behavior where pressing the 's' and 'd' keys at the same time acts almost like another new modifier key. waaaaaaaat? That new modifier is then leveraged for some home row centric key bindings that can substitute for moving your right hand or stretching the right pinky down to the arrow keys. Here's how it works: while 's' and 'd' are pressed and held with the left hand, you use the right hand to press h to move the cursor left. 'h' for left, 'j' for down, 'k' for up, 'l' for right. You may recognize these commonly used vi cursor movement keys. With hand in place, pressing down the 's' and 'd', you can press 'a' to add the option/alt modifier, 'f' to add cmd modifier, or spacebar to add shift modifier. Those keys are all lying right under the fingertips of where the left hand is already positioned, minimizing the needed movement.















Hammerspoon rapid fire script