Jump to content

Start a workflow at logon

Recommended Posts

Hello everyone,


being an old dog, it's hard for me to learn new tricks.


I just received a new MBP M1 14" and being a programmer from times past, I just can't get used to the location a the tilde (~) key. That's why I'd like to exchange the location of tilde (~) with paragraph (§) key. I only have to execute the following once at logon:

hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064},{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035}]}'


I'd like to create any kind of workflow performing the above once automatically at logon.

Can anyone give me a hint or two?


I could do that using launchctl, but I'd rather have all my automations in one place.


Thx in advance,


Edited by donnoating
Link to comment
21 hours ago, vitor said:

And you’ll have to. By design, Alfred Workflows have to be purposely called, there’s no facility to auto-run them on their own.

@vitor, thanks for the help. I did hope there would be some kind of startup hook to execute stuff.


Actually used https://rakhesh.com/mac/using-hidutil-to-map-macos-keyboard-keys/ to alter the keyboard layout only when I login. No one else should have to put up with my shenanigans 😉 

Edited by donnoating
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...