![]() ![]() ![]() I thought it would be nice to form the muscle memory for those h/j/k/l vi cursor movement keys as a side benefit for when I might occasionally run vi on a remote server. Those keys are all lying right under the fingertips of where the left hand is already positioned, minimizing the needed movement. 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. You may recognize these commonly used vi cursor movement keys. 'h' for left, 'j' for down, 'k' for up, 'l' for right. 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. 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. 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. 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. 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. 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. 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. 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. 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. 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. Additionally, 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. With this Karabiner recipe enabled, you press a hyper key and then h/j/k/l to move the cursor left/down/up/right. Then, mid-way through patting myself on the back, I discovered global vi mode with a hyper key and Karabiner. I like keyboard shortcuts bound to keys based on a pnemonic, so binding my global spectacle keyboard shortcut cheatsheet to hyper k seemed like a good, quick win that would help me memorize those Spectacle shortcuts. Having an extra meta key with a whole slew of nonconflicting keybinding slots seemed awesome. I had combed through many blogs and git repositories. ![]() If wf.x ~= math.floor(sf.x sf.w/3) and wf.w ~= math.floor(sf.After my initial experiments using Karabiner to bind a keyboard shortcut to an image-based cheatsheet and leverage a hyper key to avoid application level key binding conflicts and finger twister, I was super excited. #CURSOR RIGHT HAMMERSPOON CODE#I've only posted the code i think is relevant below: local rightScreen = hs.screen.primaryScreen(0圆00003f98880) Reading the docs, hs.screen.mainScreen() enable the current focused screen so it should work?Īs an aside.the secondary monitor is actually physically the same monitor as the primary running PBP (otherwise graphics card can not handle the resolution) #CURSOR RIGHT HAMMERSPOON WINDOWS#hitting the shortcut on windows on the secondary monitor enables the first position, but a second press does nothing. I'm new to Lua and hammerspoon and can not for the life of me figure out why the below code works fine on my primary screen, but the cycling though positions does not work on my secondary monitor. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |