How to filter and override text input on Mac OS X

I am trying to figure out the ObjC code needed to determine if a user is entering text into a text field / area in OSX or not. I would like to provide special key bindings and text extension, if any. I am not writing a key sniffer.

I tried to do this by finding that the cursor is hidden, or the cursor mode is IBeam, but this does not work. For example, a false positive case is when Chrome hides the cursor when switching tabs, so the user is not in text input mode, but the cursor is hidden.

Any help would be greatly appreciated.

Thank.

+5
source share
3 answers

, API , . , , .

+3

, . ( 5 ) ( ).

0

, , , , Snow Leopard ; . "" " " " ".

, " " , . ( ) , AppKit, , , , Adobe Flash- ( , " " ). , , , , , [1], , .

[1]: The TN2150 describes how the secure data entry mode works and the manual interface to it. Most (Cocoa) applications just use NSSecureTextField, which does the hard work for you.

0
source

All Articles