author Ryan C. Gordon <>
Wed, 26 Jun 2019 13:21:43 -0400
changeset 12907 6a3b2cc9d66c
parent 11647 5816b27073a4
permissions -rw-r--r--
cocoa: Check for capslock in -[NSResponder flagsChanged], not with IOKit.

Using IOKit for this pops up a warning at startup on macOS 10.15 ("Catalina"),
asking the user to authorize the app to listen to all keyboard input in the
system, which is unacceptable.

I _think_ we were using IOKit under incorrect presumptions here; the Stack
Overflow link mentioned in it was complaining about not being able to use
flagsChanged to differentiate between left and right mod keys, but that's not
an issue for capslock.

It's also possible this code was trying to deal with capslock changing when
the window didn't have focus, but we handle this elsewhere now, if we didn't
at the time.
     1 include ':app'