4/5/2023 0 Comments Right arrow hammerspoonAt last I created a dummy workflow in Alfred 2 and successfully registered these keystrokes as triggers. Reply to this email directly or view it on GitHub:įor what it's worth, I tried to bind ctrl+left/right in Zephyros and got some errors in the logs that binding the keystrokes failed. Sounds pretty much like GC after all.Įven though the code snippet above will run on its own, here's my complete setup if this helps: I'm going to create a hotkey binding for displaying the state and assign the eventtap to a variable. Reply to this email directly or view it on GitHub #400 (comment). There are no errors in the log, it just seems that the handler stops at some point. Now I'm having the problem that the eventtap randomly stops working. On Oct 4, 2015, at 2:04 PM, Patrick Stadler wrote: if it doesn't, then a random garbage collection that occurs just as the eventtap is disabled but before we detect this and restart it could be the culprit.Īt any rate, add the variable and let me know what affect, if any, that has. if it is, that would prevent gc and we're back to not knowing. I'll look at the source later and see if its storing the eventtap in the registry or not. Command + Space and then 2 opens 2Do, but Command + Space and then shift + 2 creates a new 2Do. I’ve started adding advanced actions to certain apps, such as 2Do, using a modifier for the activation key. If that returns false, then its been stopped, but I'm not sure why since unless you request the stop explicitly (or it is garbage collected during a reload or Hammerspoon quitting) it should restart itself.Īctually, since you're not capturing the eventtap in a variable, it might be garbagecollection. Hammerspoon’s modes can trigger actions based on single keys or even modifier keys. " before the hs.eventtap.new command and when it stops, check if it is enabled with "myEventTap:isEnabled()" HeadphoneAutoPause: Play/pause music players when headphones are connected/disconnected. HCalendar: A horizonal calendar inset into the desktop. ForceTouchMapper: Maps force touch clicks in specified apps to a hot key. but our code catches this, restarts the tap, and should log something like this:ġ0/4/15 12:03:55.947 AM Hammerspoon: CGEventRef eventtap_callback(CGEventTapProxy, CGEventType, CGEventRef, void *) line 23 $ eventtap restarted: (-2)Ĭapture the event tap in your code in a variable (stick something like "myEventTap =. Use Fn + h/l/j/k as arrow keys, y/u/i/o as mouse wheel, ,/. I do know that the OS will send a message to the eventtap that it has been disabled if it takes too long, low memory, too far behind, etc. Thanks for this great app, keep up the good work! stop propagation return true end): start() Local spacesModifiers =, string.format( "%d ", nextSpace)) Local spacesModifier = "ctrl " local spacesCount = spaces.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |