Important:
NSInputServiceProvider protocol is deprecated in Mac OS X v10.6 and later. To create input methods, use the Input Method Kit, described in Input Method Kit Framework Reference. For information about text input in Cocoa, see NSTextInputContext Class Reference.
A method identified as deprecated has been superseded and may become unsupported in the future.
Keyboard focus just switched from another text view to this one. (required) (Deprecated in Mac OS X v10.6.)
- (void)activeConversationChanged:(id)sender toNewConversation:(NSInteger)newConversation
This is called only when switching within the same application. sender can be cast to NSTextInput.
– activeConversationWillChange:fromOldConversation:– conversationIdentifier (NSTextInput)NSInputServer.hKeyboard focus is about to move away from this text view. (required) (Deprecated in Mac OS X v10.6.)
- (void)activeConversationWillChange:(id)sender fromOldConversation:(NSInteger)oldConversation
This is called only when switching within the same application. sender can be cast to NSTextInput.
– activeConversationChanged:toNewConversation:– conversationIdentifier (NSTextInput)NSInputServer.hReturns YES if the receiver can be disabled when the sender is not a text view, NO (required) (Deprecated in Mac OS X v10.6.)
- (BOOL)canBeDisabled
otherwise.
NSInputServer.hHandle the command identified by aSelector. (required) (Deprecated in Mac OS X v10.6.)
- (void)doCommandBySelector:(SEL)aSelector client:(id)sender
The command can be from the set of NSResponder action methods or from the set of selector values in the DefaultKeyBindings dictionary referenced in the input server’s “Info” file. sender can be cast to NSTextInput.
If you are subclassing NSInputServer, there is no need to override this method in the subclass. All you have to do is implement in the subclass the command methods you want to handle. If you do need to override this method, then you must call super for commands not handled.
If your NSInputServer uses a delegate, the delegate’s implementation of this method must call [sender doCommandBySelector:aSelector] for commands it does not handle.
– doCommandBySelector: (NSTextInput)NSInputServer.hThe client, sender, has become active. (required) (Deprecated in Mac OS X v10.6.)
- (void)inputClientBecomeActive:(id)sender
This is called when the client application starts up and whenever it becomes active after being inactive. sender can be cast to NSTextInput.
NSInputServer.hA text view in the client, sender, has ceased to be the key-receiving first responder. (required) (Deprecated in Mac OS X v10.6.)
- (void)inputClientDisabled:(id)sender
inputClientResignActive: may also be called just after this is called. sender can be cast to NSTextInput.
NSInputServer.hA text view in the client, sender, has become the key-receiving first responder. (required) (Deprecated in Mac OS X v10.6.)
- (void)inputClientEnabled:(id)sender
This is called the first time any text view becomes enabled after client application activation and again whenever focus switches to a text view. inputClientBecomeActive: may have been called just before this is called. sender can be cast to NSTextInput.
NSInputServer.hThe client, sender, is about to become inactive. (required) (Deprecated in Mac OS X v10.6.)
- (void)inputClientResignActive:(id)sender
This is called when the client application quits and whenever it is deactivated. sender can be cast to NSTextInput.
NSInputServer.hInterpret the characters in aString, which is actually always an NSString. (required) (Deprecated in Mac OS X v10.6.)
- (void)insertText:(id)aString client:(id)sender
Here is where you do the interpreting of keyboard input. If your server’s interpretation is disabled or the characters in aString are not of interest to the server, you can simply pass aString along to the sender’s insertText: method. sender can be cast to NSTextInput.
– insertText: (NSTextInput)NSInputServer.hAbandon any marked text state that may be in process. (required) (Deprecated in Mac OS X v10.6.)
- (void)markedTextAbandoned:(id)sender
This can happen if the user clicks the mouse outside of the marked text area or if the window containing the text view closes. The client can do what it wants with the marked text. NSTextView leaves it as inserted text. sender can be cast to NSTextInput.
– markedTextSelectionChanged:client:– markedTextAbandoned: (NSInputManager)NSInputServer.h(Deprecated in Mac OS X v10.6.)
- (void)markedTextSelectionChanged:(NSRange)newSelection client:(id)sender
The user selected a portion of the marked text or clicked at the beginning or end of marked text or somewhere in between. sender can be cast to NSTextInput.
– markedTextAbandoned:– markedTextSelectionChanged:client: (NSInputManager)NSInputServer.hThe client application is quitting. (required) (Deprecated in Mac OS X v10.6.)
- (void)terminate:(id)sender
This is called after inputClientResignActive:. sender can be cast to NSTextInput.
NSInputServer.hA YES return value tells the client that only a call to its insertText:client: method constitutes a modification to its text storage. (required) (Deprecated in Mac OS X v10.6.)
- (BOOL)wantsToDelayTextChangeNotifications
A NO return value tells the client that all text given to it, whether marked text or not, should constitute a modification to its text storage. A YES return value tells the client that only unmarked text given to it should constitute a modification to its text storage. The client may for example want to filter all text that is part of a modification but leave marked text unfiltered.
– wantsToDelayTextChangeNotifications (NSInputManager)NSInputServer.hReturns YES if the client should forward all mouse events within the text view to the input server. (required) (Deprecated in Mac OS X v10.6.)
- (BOOL)wantsToHandleMouseEvents
If the server needs to implement the NSInputServerMouseTracker protocol, return YES.
– wantsToHandleMouseEvents (NSInputManager)NSInputServer.hReturns YES if the server wants all keystrokes to be sent to it as characters. (required) (Deprecated in Mac OS X v10.6.)
- (BOOL)wantsToInterpretAllKeystrokes
If this method returns NO, control key combinations and function keys (the arrow keys, PageDown, F5, and so on) are delivered to the input server via the key binding mechanism and doCommandBySelector:client:.
The Unicode values for the characters representing keyboard function keys (the arrow keys, PageDown, F5, and so on) names like NSUpArrowFunctionKey, and are documented in NSEvent. Control-key combinations are the usual ASCII control character codes.
For more information on key bindings, see “About Key Bindings”.
– wantsToInterpretAllKeystrokes (NSInputManager)NSInputServer.hLast updated: 2008-10-20