Class KeyBindingsManager

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
public class KeyBindingsManager : object

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 static 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()

KeyBindings

KeyBindingsFilename

Requirements

Namespace: MarkdownMonster.Utilities
Assembly: markdownmonster.exe

© West Wind Technologies, 2016-2024 • Updated: 11/23/21
Comment or report problem with topic