Up
Authors
- Generated by Richard Frith-Macdonald
-
Date: Generated at 2025-12-03
- Declared in:
- AppKit/NSInputManager.h
- Conforms to:
- NSTextInput
Availability: OpenStep
NSInputManager provides the complete
implementation of sophisticated text input
management, including customizable keybinding
processing, multi-client support, and advanced
text composition capabilities.
NSInputManager declares 8 Instance Variables
+ (
NSInputManager*)
currentInputManager;
Availability: OpenStep
Returns the current system input manager instance.
Returns: The shared NSInputManager instance for
the current application
+ (
NSString*)
describeKeyStroke: (
unichar)character
withModifiers: (unsigned int)modifiers;
Availability: OpenStep
Creates a string description of a keystroke for
configuration files. This method converts an
actual keystroke into a string that can be used in
keybinding files. Useful for Preferences
applications that need to capture user
keystrokes and save them to configuration.
character: The character component of
the keystroke modifiers: The modifier flags (pass 0 to
ignore modifiers) Returns: String
representation suitable for keybinding files
+ (BOOL)
parseKey: (
NSString*)key
intoCharacter: (
unichar*)character
andModifiers: (unsigned int*)modifiers;
Availability: OpenStep
Parses a key string into
character and modifier components. Parses
a key as found in a keybinding file (e.g.,
'Control-f' or 'Control-Shift-LeftArrow'). key:
String representation of the keystroke character:
Pointer to store the parsed character
modifiers: Pointer to store the parsed modifier
flags Returns: YES if the key
could be parsed successfully, NO
otherwise
- (void)
handleKeyboardEvents: (
NSArray*)eventArray
client: (id)client;
Availability: OpenStep
Processes an array of keyboard events for the
specified client. eventArray: Array of
NSEvent objects representing keyboard input client:
The text input client that should receive
processed input
- (BOOL)
handleMouseEvent: (
NSEvent*)theMouseEvent;
Availability: OpenStep
Handles mouse events for input processing.
theMouseEvent: The mouse event to process
Returns: YES if the event was
handled, NO to pass it on
- (
NSInputManager*)
initWithName: (
NSString*)inputServerName
host: (
NSString*)hostName;
Availability: OpenStep
Initializes an input manager with specified
input server and host. inputServerName: Name of the
input server to use hostName: Host name for
distributed input server communication Returns:
An initialized NSInputManager instance
- (
NSString*)
language;
Availability: OpenStep
Returns the language code for the current input
method. Returns: String identifier for the input
method language
- (void)
loadBindingsFromFile: (
NSString*)fullPath;
Availability: OpenStep
Loads keybindings from a configuration file. This
method can be called explicitly by applications to
load application-specific keybindings for use by the
input manager. fullPath: Full path to the keybinding
configuration file
- (
NSString*)
localizedInputManagerName;
Availability: OpenStep
Returns localized name of the input manager.
Returns: Human-readable name of the input manager
in current locale
- (void)
markedTextAbandoned: (id)client;
Availability: OpenStep
Notifies the manager that marked text has been
abandoned. client: The client where
marked text was abandoned
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (void)
markedTextSelectionChanged: (
NSRange)newSel
client: (id)client;
Availability: OpenStep
Notifies the manager of marked text selection
changes. newSel: The new selection range within
marked text client: The client where
selection changed
Not implemented (as of 2025-12-03).
Please help us by producing an implementation of
this and donating it to the GNUstep project.
- (void)
quoteNextKeyStroke;
Availability: OpenStep
Sets flag to quote the next keystroke literally.
Normally bound to Control-q. The next keystroke
will be inserted as literal text rather than being
interpreted through the keybinding system.
- (void)
resetInternalState;
Availability: OpenStep
Resets the internal state of the input manager.
Normally bound to Control-g (regardless of
context), but also automatically called whenever
the current client changes. Clears pending keystrokes
and returns to the root keybinding context.
- (BOOL)
wantsToDelayTextChangeNotifications;
Availability: OpenStep
Returns whether the manager wants to delay text
change notifications. Returns: YES to
delay notifications during processing,
NO for immediate notifications
- (BOOL)
wantsToHandleMouseEvents;
Availability: OpenStep
Returns whether the manager wants to handle mouse
events. Returns: YES to receive mouse
events, NO to ignore them
- (BOOL)
wantsToInterpretAllKeystrokes;
Availability: OpenStep
Returns whether the manager wants to interpret all
keystrokes. Returns: YES to
process all keystrokes, NO for
selective processing
Instance Variables for NSInputManager Class
@protected unichar
_abortCharacter;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected unsigned int
_abortFlags;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected GSKeyBindingTable*
_currentBindingTable;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected id
_currentClient;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _insertControlKeystrokes;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected BOOL _interpretNextKeyStrokeLiterally;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected NSMutableArray* _pendingKeyEvents;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
@protected GSKeyBindingTable* _rootBindingTable;
Availability: OpenStep
Warning the underscore at the start of the
name of this instance variable indicates that, even
though it is not technically private, it is
intended for internal use within the package, and
you should not use the variable in other code.
- Declared in:
- AppKit/NSInputManager.h
Availability: OpenStep
The NSTextInput protocol defines the interface that
text-capable objects must implement to work with
input managers. This protocol enables sophisticated
text input processing including marked text composition
and character-level interaction.
- (
NSAttributedString*)
attributedSubstringFromRange: (
NSRange)theRange;
Availability: OpenStep
Returns attributed substring from the specified
range. theRange: The range of text to retrieve
Returns: NSAttributedString containing the text
and attributes
- (
NSUInteger)
characterIndexForPoint: (
NSPoint)thePoint;
Availability: OpenStep
Returns character index for a given point.
thePoint: The point to convert to character index
Returns: Character index at the specified point
- (
NSInteger)
conversationIdentifier;
Availability: OpenStep
Returns unique identifier for this text input
conversation. Returns: Unique integer
identifier for input session tracking
- (void)
doCommandBySelector: (SEL)aSelector;
Availability: OpenStep
Executes a command by selector. aSelector: The
selector identifying the command to execute
- (
NSRect)
firstRectForCharacterRange: (
NSRange)theRange;
Availability: OpenStep
Returns rectangle for the specified character
range. theRange: The character range to get
rectangle for Returns: NSRect bounding the
specified character range
- (BOOL)
hasMarkedText;
Availability: OpenStep
Returns whether there is currently marked text.
Returns: YES if marked text exists,
NO otherwise
- (void)
insertText: (id)aString;
Availability: OpenStep
Inserts text at the current insertion point.
aString: The string or attributed string to insert
- (
NSRange)
markedRange;
Availability: OpenStep
Returns the range of marked text. Returns: NSRange
of marked text, or NSNotFound range if none
- (
NSRange)
selectedRange;
Availability: OpenStep
Returns the currently selected text range. Returns:
NSRange of selected text
- (void)
setMarkedText: (id)aString
selectedRange: (
NSRange)selRange;
Availability: OpenStep
Sets marked text with a selected range for
composition. aString: The string or attributed
string to mark selRange: The selected range within
the marked text
- (void)
unmarkText;
Availability: OpenStep
Removes marking from text, finalizing composition.
- (
NSArray*)
validAttributesForMarkedText;
Availability: OpenStep
Returns attributes valid for marked text display.
Returns: NSArray of attribute names that can be
used for marked text
Up