Keyboard Input
Keyboard support for GraphComponent is handled by KeyboardInputMode. Instead of manually adjusting the input and action maps of GraphComponent, you should use KeyboardInputMode to bind gestures to commands. This has the advantage that you can easily install and uninstall these commands as part of the input mode. Furthermore, they are automatically disabled or enabled when the input mode is (e.g. when an animation runs).
KeyboardInputMode provides means to install and uninstall ICommand using a recognizer function or a combination of Key and ModifierKeys.
- addKeyBinding(key: Key, modifiers: ModifierKeys, execute: ExecuteCommandHandler, canExecute: CanExecuteCommandHandler): KeyboardInputModeBinding
- addRecognizerBinding(recognizer: EventRecognizer, execute: ExecuteCommandHandler, canExecute: CanExecuteCommandHandler): KeyboardInputModeBinding
- Registers execution handlers to a given key stroke or recognizer function.
- addKeyBinding(key: Key, modifiers: ModifierKeys, command: ICommand, commandParameter: Object): KeyboardInputModeBinding
- addRecognizerBinding(recognizer: EventRecognizer, command: ICommand, commandParameter: Object): KeyboardInputModeBinding
- Registers an ICommand to a given key stroke or recognizer function.
- addCommandBinding(command: ICommand, execute: ExecuteCommandHandler, canExecute: CanExecuteCommandHandler): KeyboardInputModeBinding
- Adds a command and associated execution handlers to the KeyboardInputMode.