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 OptionSelector.
public bool AddKeyBindingsForHotKey(Key prevHotKey, Key hotKey, object? data = null)
Parameters
prevHotKeyKeyThe HotKey
hotKeyis replacing. Key bindings for this key will be removed.hotKeyKeyThe new HotKey. If Empty
prevHotKeybindings will be removed.dataobjectArbitrary data that can be associated with this key binding.
Returns
Remarks
Key bindings are added for both the base key (e.g. D3) and the Alt-shifted key
(e.g. Key.D3.WithAlt).
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.