obs-studio icon indicating copy to clipboard operation
obs-studio copied to clipboard

[macOS]: When OBS is running, Caps Lock switches to last app, despite no hotkeys set in OBS

Open jshier opened this issue 1 year ago • 3 comments

Operating System Info

Other

Other OS

macOS 15

OBS Studio Version

30.2.3

OBS Studio Version (Other)

No response

OBS Studio Log URL

https://obsproject.com/tools/analyzer?log_url=https%3A%2F%2Fobsproject.com%2Flogs%2FU8Z7GOQepGqKcJdo

OBS Studio Crash Log URL

No response

Expected Behavior

With no hotkeys set, OBS has no effect on global shortcuts.

Current Behavior

When OBS is running, hitting Caps Lock triggers the OS' "switch to last app" action, and repeats the action ever couple seconds that the button is active. This means that, while playing a game, hitting Caps Lock will switch to the previous app, away from the game.

Disabling OBS's Accessibility permission fixes the issue.

Steps to Reproduce

No particular steps, simply running the app triggers the behavior for me.

Anything else we should know?

Occurred on macOS 14 as well. I've simply removed OBS' accessibility permission to fix it, though that's not a solution if I wanted to use any hotkeys.

jshier avatar Sep 24 '24 00:09 jshier

On your system, have you set caps lock to trigger any action besides the system default?

In any case, this is likely solved by #11100 et. al. There is not currently an OBS beta, but you may wish to see if you can reproduce this behavior on a recent nightly, or a beta version when it exists.

jcm93 avatar Sep 24 '24 04:09 jcm93

Looks like I spoke too soon, even with accessibility access turned off, Caps Lock still switch to the previous app, but only when I'm streaming. I don't have any other Caps Lock shortcuts set up, and if I disable it altogether for this keyboard, the issue stops. If I could I'd disable it just for OBS, but it's all or nothing.

I'm happy to try a nightly, where can I download them? I don't see releases and a search for "obs nightly" didn't seem to turn up anything.

jshier avatar Sep 27 '24 00:09 jshier

Please confirm whether or not this is fixed in OBS 31 Beta 1.

gxalpha avatar Oct 17 '24 10:10 gxalpha

@gxalpha Sorry, just started streaming again, and no, it doesn't look like it was fixed in OBS 31. Caps Lock still switches to the previous app while streaming is active.

jshier avatar Dec 16 '24 22:12 jshier

and repeats the action ever couple seconds that the button is active

Reading this original report a bit more thoroughly, I'm having a hard time imagining that this behavior could be related to anything OBS is doing specifically. It sounds like when OBS is open, every couple of seconds, it's as if Command-Tab were pressed, and the last active application is switched to.

All OBS does is listen for keypress events and make an internal note when they occur; there is no mechanism in OBS that would ever generate a keypress and forward it to the system. At this point I find it more likely this is some peculiarity of your specific setup involving another application or background process on your system. As to why it only occurs when OBS has Accessibility permissions, I could only guess.

It might be worth trying https://github.com/obsproject/obs-studio/pull/9583 and seeing if that has any impact on this issue. I'd also suggest closely examining any login items or other types of background processes on your system.

jcm93 avatar Dec 16 '24 23:12 jcm93

Testing a bit more, it still occurs when OBS has its accessibility permission turned off. And it only happens while streaming. It doesn't happen when OBS is just running or any other time in any other app.

Edit: Only other app I have that messes with system inputs is SteerMouse, but that's strictly mouse related and I don't even have any customized buttons using Caps Lock.

And which part of 9583 did you want me to try, the permission reset? Or did you want me to try the branch? Are there branch builds or should I build myself?

Edit: I tried removing OBS from the accessibility permissions entirely and I don't see the issue anymore. It is a bit intermittent, so I'll test more later.

jshier avatar Dec 17 '24 00:12 jshier

Testing more, it seems like the issue isn't resolved. It may just take a little while to become active, but it still happens, even with OBS' accessibility preference completely removed. I'm really not sure what else to do to investigate this. Is there a tool that can tell me where the Caps Lock action is coming from?

jshier avatar Dec 20 '24 18:12 jshier