koekeishiya / skhd

Simple hotkey daemon for macOS
MIT License
5.87k stars 203 forks source link

Skhd is not working with MacOS Ventura 13.4 #278

Open ruperlopez opened 1 year ago

ruperlopez commented 1 year ago

Skhd stop working in my OS. I've been countless hours trying to solve it because skhd makes me much more productive, and I couldn't. Clarification: I disabled security integrity protection, I disabled secure keyboard entry, I rebooted my pc

My first error is: skhd: successfully created pid-file.

Codesigning

fredrikaverpil commented 1 year ago

@ruperlopez I just stumbled upon this issue by chance, and for what it's worth, I just installed yabai and skhd (with brew) and it works on macOS Ventura 13.4 for me. I didn't have any of this installed previously, so I have a "clean install" of it.

I'm not sure what the problem is that you are experiencing, but it for sure is possible to run it on this version of macOS.

All I did was

brew tap 'koekeishiya/formulae'

brew install yabai
yabai --start-server

brew install skhd
skhd --start-server

And everytime I started a server I had to open up the UI privacy settings to allow these daemons to run etc.

I had to reboot to get skhd to work.

metelsky commented 1 year ago

Having the same issue. But when trying to re-install skhd there is an error:

Warning: No available formula with the name "skhd".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for skhd.
malav097 commented 1 year ago

i have the same error here, did the same steps as you, box in accessibility also checked. error log: skhd: must be run with accessibility access! abort..

fredrikaverpil commented 1 year ago

Not sure what's wrong but maybe try:

  1. ls /tmp/skhd_*.log and look inside them, especially the one with ending with .err.log.
  2. Try removing the ~/.config/skhd/skhdrc and replace it with a new file that just has one very simple command.
  3. Check if skhd is actually running: ps aux | grep skhd (ignore the entry which says grep skhd as that's the command you just ran).

Also, I believe that skhd only starts up once you log into the macOS UI, so you may want to log out and log back in (or reboot).

fredrikaverpil commented 1 year ago

Having the same issue. But when trying to re-install skhd there is an error:

Warning: No available formula with the name "skhd".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for skhd.

@metelsky Maybe try

brew tap 'koekeishiya/formulae'
brew install skhd

Also try brew doctor (to find/fix any potential problems) and perhaps brew upgrade (upgrades all brew taps and packages).

ll931217 commented 1 year ago

I currently have these lines in my config:

alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
alt - h : yabai -m window --focus west ; yabai -m space --focus west
alt - l : yabai -m window --focus east ; yabai -m space --focus east

But when I try to switch windows, I get ¬¬¬˙˙˙˙˙¬˙¬˙¬˙¬˙¬˙¬˙¬˙¬˙

I am on MacOS Ventura 13.4

image
BrookJeynes commented 1 year ago

I currently have these lines in my config:

alt - j : yabai -m window --focus south
alt - k : yabai -m window --focus north
alt - h : yabai -m window --focus west ; yabai -m space --focus west
alt - l : yabai -m window --focus east ; yabai -m space --focus east

But when I try to switch windows, I get ¬¬¬˙˙˙˙˙¬˙¬˙¬˙¬˙¬˙¬˙¬˙¬˙

I am on MacOS Ventura 13.4

image

I can attest to this as well, ever since updating to 13.4 any keymap that used option no longer works...

berenddeboer commented 1 year ago

I can report skhd works on Ventura 13.4.1. But not easy. I can't launch it from Alacritty. Have to open up the default terminal, make sure secure keyboard entry is disabled, and then run skhd &.

ruperlopez commented 1 year ago

Skhd is working on my OS. However, if I run skhd -V I still get skhd: could not lock pid-file! abort..

Here are some of the issues that I fixed to get it working:

ll931217 commented 1 year ago

Skhd is working on my OS. However, if I run skhd -V I still get skhd: could not lock pid-file! abort..

Here are some of the issues that I fixed to get it working:

  • I delete this line <my_keymap> : yabai -m display --focus west. With this line skhd doesn't work.
  • It seems that Ventura 13.4 sometimes automatically enables "ApplePressAndHOldEnabled" in the OS, and therefore "Security entry keyboard" in iterm2 (in the menu bar>iterm2 it appears a - and it cannot be deselected). I took this steps:
  1. In the terminal run defaults read -g ApplePressAndHoldEnabled. If the output is 1, it means that the security entry keyboard is enabled (You'll see the - in menubar>iterm2
  2. Run defaults write -g ApplePressAndHoldEnabled -bool true
  3. Run again defaults read -g ApplePressAndHoldEnabled, now the output should be 0
  4. Kill the session by doing either pkill -u <username> (less aggressive) or sudo pkill -9 -u <username>
  5. After login again skhd should be working. You can check that the output is still 0 when you run defaults read -g ApplePressAndHoldEnabled, and in menubar>iterm2 "Security entry keyboard" won't have a tick or a dash

I can confirm this worked for me, thanks!

alwyn commented 11 months ago

Getting the same on Ventura 13.5 with a signed binary. I can start skhd, but when I run skhd -V I get "must be run with accessibility access".

sitko-j commented 11 months ago

defaults read -g ApplePressAndHoldEnabled returns 0 for me, but i'm still getting skhd: could not lock pid-file! abort...

I'm on Ventura 13.4. Will keep digging.

8joe commented 10 months ago

@sitko-j Were you able to find the solution?

sitko-j commented 10 months ago

Unfortunately not :( I can't say that I'll keep trying but should I ever come back to it and get different results I'll post my findings.

ruperlopez commented 10 months ago

I ended up summarizing that I have to do two things to make it work in my OS:

  1. not to have this line in the skhd file: <my_keymap> : yabai -m display
  2. when it doesn't work, I have to log out my session, and then log in

By logging out and logging in, the problem is solved in my OS, although:

I believe that some process gets activated automatically by the OS (didn't find which), and does to things:

nivethan-me commented 2 months ago

I ended up summarizing that I have to do two things to make it work in my OS:

  1. not to have this line in the skhd file: <my_keymap> : yabai -m display
  2. when it doesn't work, I have to log out my session, and then log in

By logging out and logging in, the problem is solved in my OS, although:

  • skhd -V throws skhd : could not pid-file! abort..
  • I have to log out an log in often (sometimes once a day, sometimes once a week, it's random)

I believe that some process gets activated automatically by the OS (didn't find which), and does to things:

  • makes skhd stop working
  • changes ApplePressAndHoldEnabled from 1 to 0

same issue for me as well. i have to logout and login to make the skhd work after every restart. but my ApplePressAndHoldEnabled is always 0

so i have to do the following pkill -u username