Checking Caps Lock Status in Cocoa

OK I am starting my first OS X application. Instead of doing something obvious or simple, I go straight to the system stuff.

I would like to put a cover lock indicator in the menu bar. In C # or Delphi (my main languages) this is pretty trivial. On Mac OS X, I'm not sure where to start. Of course, I downloaded Xcode and wrote some small style apps. Now I need to write an application that will start at startup, only have the menu bar component and work.

There is my background. How can I get the state of the cap lock key in Cocoa?

+3
source share
1 answer

: . , , . , ; API Launch Services, .

: . . NSStatusItem.

: -, , , ( , , - ). , .

, /. , HID Manager. API C, Objective-C ( 1.0.1).

: , , , , .

+6

Source: https://habr.com/ru/post/1703210/


All Articles