Method AddKeyBindingsForHotKey
AddKeyBindingsForHotKey(Key, Key, object?)
Adds key bindings for the specified HotKey. Useful for views that contain multiple items that each have their own HotKey such as RadioGroup.
public virtual bool AddKeyBindingsForHotKey(Key prevHotKey, Key hotKey, object? context = null)
Parameters
prevHotKeyKeyThe HotKey
hotKeyis replacing. Key bindings for this key will be removed.hotKeyKeyThe new HotKey. If Empty
prevHotKeybindings will be removed.contextobjectArbitrary context that can be associated with this key binding.
Returns
Remarks
By default, key bindings are added for both the base key (e.g. D3) and the Alt-shifted key
(e.g. Key.D3.WithAlt) This behavior can be overriden by overriding AddKeyBindingsForHotKey(Key, Key, object?)
.
By default, when hotKey is A through Z key bindings
will be added for both the un-shifted and shifted versions. This means if the HotKey is A,
key bindings for Key.A and Key.A.WithShift will be added. This behavior can be overriden by
overriding AddKeyBindingsForHotKey(Key, Key, object?).