- Inherits From:
- NSWindow
- Declared In:
- EDKeyControlWindow.h
The exact behaviour is determined by a "key binding" dictionary which is loaded from a file named KeyBindings.dict
in the application's main bundle. This can be overriden by a file in any of the applications library directories.
The dictionary uses the keyboard key as key and the selector as value. A tilde character preceeding the key name is interpreted as ALT
modifier and a caret as CTRL
modifier. Alternatively, the value can be another dictionary in which case this sub dictionary becomes active after the corresponding key was pressed. When a key not defined in the sub dictionary is pressed, the main dictionary becomes active again. If a sub directory contains the key "prompt"
the corresponding value is displayed in the prompt field when the sub directory becomes active.
Example: Consider the following file:
{
n = "gotoNext:";
"^x" = {
prompt = "x-tras";
s = "save:";
}
}
If the user presses n
the selector gotoNext:
is sent. If the user presses CTRL-x
the prompt field appears and shows the text "x-tras". Pressing s
now results in the selector save:
being sent.
NSDictionary *toplevelKeyBindingDictionary;
NSDictionary *currentKeyBindingDictionary;
IBOutlet NSTextField *promptField;
IBOutlet NSView *referenceView;
toplevelKeyBindingDictionary This instance variable is private. currentKeyBindingDictionary This instance variable is private. promptField Text field used to display prompts. referenceView Prompt field is kept at the same position relative to this view when the window is resized
Assigning the reference view
- - setReferenceView:
- - referenceView
- (NSView *)referenceView
No method description.
- (void)setReferenceView:(NSView *)aView
No method description.