PS: From what I can tell, this secure text mode refers to a feature introduced in the Carbon / 10.3-10.4 (!) era, but I can't find hints as to how to legitimately work with it. Thank you for your patience reading this long write-up □ I have Googled for various bits of that error message such as "secureTextInput is active and this process doesn't have secure text mode", and there don't seem to be any good leads! Except this Alfred forum post, which may or may not pan out. How can I either launch the process in a way that macOS believes it's in response to user activity, or perhaps "enable secure text mode" they refer to? This made me reflect that Hammerspoon needs to be added to System Preferences > Security & Privacy > Privacy > Accessibility, so I tried to add my binary ( ~/src/keuze/build/Release/keuze) to that list, too. I did notice that when I enabled Console.app's log streaming feature, select a password field, and trigger the keybinding, there is one suspicious entry that seems to be a smoking gun:Įrror 18:20:36.254859+1100 WindowServer CPS: Denying keuze the right to be in front because secureTextInput is active and this process doesn't have secure text mode enabled, and this request was not caused by user activity Local chooser = hs.chooser.new(function(choice) Hammerspoon keybinding: hs.hotkey.bind(, "o", function() The "real" keuze can't be invoked like this, but I've forked it and hard-coded a prompt text and list of options for testing purposes.) keuze refers to a fork of I have been trying out. hs:nup This nudges the current window up. ![]() hs:open This opens the Hammerspoon console to the foreground. hs:reload This tells Hammerspoon to reload the configuration file. This will work for all versions newer than version 1.4. Here's my setup, roughly: (it is stripped down from what I normally use, but reproduces the issue. This will upgrade the hammerspoon configuration file instead of writing the main config file. This hasn't been an issue in previous macOS versions, and the same setup (via versioned dotfiles) works fine in Big Sur, unchanged. It still works (unchanged for a few years now), except when a password field (i.e., NSSecureTextField) is key and has focus. I have a hotkey bound in Hammerspoon, which launches a very light GUI chooser-menu app (to auto-fill passwords from pass). I have just started using macOS Monterey, and I suspect that the new macOS version has broken my workflow. The following snippet allows me to type that text with a combo of shortcuts, without using any additional applications.This is a slightly obscure issue, so I'll do my best to describe it as well as what I've already tried. 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. While ten years ago I would have leapt for the tiling options 1 (I still would like to give i3wm a go one of these. There is a lot of awesome Hammerspoon code to help you with that, from clones of popular Mac applications like Spectacle to complex tiling systems. ![]() As a programmer, it’s easy to get frustrated when I have to switch from mouse and keyboard. One of the main things people do with Hammerspoon is wrangle their window layouts. 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. |