KeyBindingsManager Class

Class that maps Key Bindings to Commands or a JavaScript handler in Ace Editor to a KeyBindings handler function with the same name as the command (in camelCase - OpenDocument-> openDocument()

To use: * Subclass from this class * Add keybindings in ctor() and map to Commands/JavaScript handlers * Instantiate * call SetKeyBindings() to attach bindings for control * (optional) call SaveKeyBindings() to save to disk * (optional) call LoadKeyBindings() to load from disk

System.Object
   MarkdownMonster.Utilities.KeyBindingsManager

Class Members

MemberDescription
Constructor Initialize - pass in a control - typically a Window - that the bindings are applied to.
CreateKeyboardShortcutBinding Creates a keyboard shortcut from a
public KeyBinding CreateKeyboardShortcutBinding(string ksc, ICommand command, object commandParameter)
GetInputGestureForCommand Returns the keyboard shortcut for a given command. This is the mapped command if extended via keyboard bindings.
public string GetInputGestureForCommand(string commandName)
LoadKeyBindings
public bool LoadKeyBindings(string filename)
SaveKeyBindings Saves key bindings to a file
public bool SaveKeyBindings(string filename)
SetKeyBindings
public void SetKeyBindings()
BindingsControl The control or window that this manager is bound to
KeyBindings
KeyBindingsFilename
Namespace: MarkdownMonster.Utilities

Assembly: MarkdownMonster.dll



© West Wind Technologies, 2025 • Updated: 2025-02-25
Comment or report problem with topic