Method Add
Add(Key, KeyBinding, View?)
Adds a KeyBinding to the collection.
public void Add(Key key, KeyBinding binding, View? boundViewForAppScope = null)
Parameters
key
Keybinding
KeyBindingboundViewForAppScope
ViewOptional View for Application bindings.
Add(Key, KeyBindingScope, View?, params Command[])
Adds a new key combination that will trigger the commands in commands
.
If the key is already bound to a different array of Commands it will be rebound
commands
.
public void Add(Key key, KeyBindingScope scope, View? boundViewForAppScope = null, params Command[] commands)
Parameters
key
KeyThe key to check.
scope
KeyBindingScopeThe scope for the command.
boundViewForAppScope
ViewOptional View for Application bindings.
commands
Command[]The command to invoked on the View when
key
is pressed. When multiple commands are provided,they will be applied in sequence. The boundkey
strike will be consumed if any took effect.
Remarks
Commands are only ever applied to the current View (i.e. this feature cannot be used to switch focus to another view and perform multiple commands there).
Add(Key, KeyBindingScope, params Command[])
Adds a new key combination that will trigger the commands in commands
.
If the key is already bound to a different array of Commands it will be rebound
commands
.
public void Add(Key key, KeyBindingScope scope, params Command[] commands)
Parameters
key
KeyThe key to check.
scope
KeyBindingScopeThe scope for the command.
commands
Command[]The command to invoked on the View when
key
is pressed. When multiple commands are provided,they will be applied in sequence. The boundkey
strike will be consumed if any took effect.
Remarks
Commands are only ever applied to the current View (i.e. this feature cannot be used to switch focus to another view and perform multiple commands there).
Add(Key, View?, params Command[])
Adds a new key combination that will trigger the commands in commands
(if supported by the
View - see GetSupportedCommands()).
This is a helper function for Add(Key, KeyBinding, View?). If used for a View ( BoundView is set), the scope will be set to Focused. Otherwise, it will be set to Application.
If the key is already bound to a different array of Commands it will be rebound
commands
.
public void Add(Key key, View? boundViewForAppScope = null, params Command[] commands)
Parameters
key
KeyThe key to check.
boundViewForAppScope
ViewOptional View for Application bindings.
commands
Command[]The command to invoked on the View when
key
is pressed. When multiple commands are provided,they will be applied in sequence. The boundkey
strike will be consumed if any took effect.
Remarks
Commands are only ever applied to the current View (i.e. this feature cannot be used to switch focus to another view and perform multiple commands there).
Add(Key, params Command[])
Adds a new key combination that will trigger the commands in commands
(if supported by the
View - see GetSupportedCommands()).
This is a helper function for Add(Key, KeyBinding, View?). If used for a View ( BoundView is set), the scope will be set to Focused. Otherwise, it will be set to Application.
If the key is already bound to a different array of Commands it will be rebound
commands
.
public void Add(Key key, params Command[] commands)
Parameters
key
KeyThe key to check.
commands
Command[]The command to invoked on the View when
key
is pressed. When multiple commands are provided,they will be applied in sequence. The boundkey
strike will be consumed if any took effect.
Remarks
Commands are only ever applied to the current View (i.e. this feature cannot be used to switch focus to another view and perform multiple commands there).