Hi all,
I've used a macOS automation tool, Hammerspoon, to simulate Acme's cut/paste mouse chords system wide (so they may be used in other apps, like Safari, Stickies, etc.). The goal is to reduce that bit of cognitive friction or context switching when moving between cut/paste paradigms. Sharing here in case it is of interest to any other macOS plan9port users:
At a high level, Hammerspoon uses the macOS accessibility API to expose the OS to a Lua scripting engine. This Lua script listens to mouse button down/up events and simulates keystrokes (CMD-C, DEL, and CMD-V) to manipulate the focused application and system pasteboard. When Acme itself has input, it stops all its event listeners so as to not interfere with native chords.
I'm new to Hammerspoon and Lua, so there may bone-headed mistakes in this script, but my experience so far has been positive. Happy to discuss Qs off list too.
Colin
P.S. Welcome feedback if this is off topic. It's the only plan9port discussion community I follow, so sharing here even though this is broadly about p9p users rather than dev.