This is useful primarily in conjunction with other modules, such as hs.menubar, when a callback is already in progress or waiting for an event callback is not practical or possible. This is an instantaneous poll of the current keyboard modifiers for the most recently used keyboard, not a callback.* _raw - a numeric representation of the numeric representation of all of the keyboard/modifier flags. Returns a table containing boolean values indicating which keyboard modifiers were held down when the function was invoked The possible keys are:.raw - an optional boolean value which, if true, includes the _raw key containing the numeric representation of all of the keyboard/modifier flags.Returns a table containing the current key modifiers being pressed or in effect at this instant for the keyboard most recently used. Hs.eventtap.checkKeyboardModifiers() -> table Methods - API calls which can only be made on an object returned by a constructorĪPI Documentation Functions checkKeyboardModifiers Signature.Constructors - API calls which return an object, typically one that offers API methods.Functions - API calls offered directly by the extension. This module is based primarily on code from the previous incarnation of Mjolnir by Steven Degutis. If you need to construct finely controlled mouse/keyboard events, see hs.eventtap.event It also provides convenience wrappers for sending mouse and keyboard events. Tap into input events (mouse, keyboard, trackpad) for observation and possibly overriding them The following snippet allows me to type that text with a combo of shortcuts, without using any additional applications.Hammerspoon docs: hs.eventtap docs » hs.eventtap bind (, "R", addReminder )Īs a Javascript developer who is not good at debugging, I spent 10% of my coding time typing console.log. appFromName ( name ): activate () end end end - quick open applications hs. launchOrFocus ( name ) if name = 'Finder' then hs. Here is my simple solution with Hammerspoon:įunction open ( name ) return function () hs. But Bettertools involves a lot of unnecessary feaetures, and PowerPack is expensive. Before I discovered Hammerspoon, I have tried Bettertools and Alfred (with PowerPack) to do that. Opening an application by holding two keys in the keyboard, is something I’ve used for year since I used Windows. My recipes of ~/.hammerspoon/a Open application with alt + X I think it should be a very simple helper tool for developers. I don’t have too many requirements from Hammerspoon. hammerspoon, even though it seems more intuitive. I don’t want to setup some sort of git repo for. I intend not to use it since I want to just copy and paste my configuration file text from Github. I will list some of my most useful features when I use Hammerspoon in this post.įirst of all, even though Lua has a very simple module manage system. That’s why I use Hammerspoon – a perfect solution for macOS automation. As a programmer, it’s easy to get frustrated when I have to switch from mouse and keyboard. I have been committing to free my hand from mouse for a very long time. When connected to work Wifi, mute the computer to avoid awkward moment.Quick switch Chrome users, or open incognito mode.Snap windows to the edges of the screen, and resize it!.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |