Skip to content
Andr3as edited this page Oct 5, 2013 · 10 revisions

##General Keymap uses jQuery to create a keymap in the given div

##API

####.keymap(options) Create your keymap

######Parameters

  • options - (optional) - (Object)
    • type - (String) - "reset" to reset or recolor your keymap else create a keymap
    • css - (Object) - coloring attributes
      • key - Attribute of the keys
        • color - Color of the letters
        • background - Background color of the keys
        • class - You can also add a class to every key, and style them with a stylesheet
    • layout - (String) - Name of the layout file in the layouts directory
      • Default - "qwerty"

####.deleteKeymap() Delete an existing keymap

####.createKeymap(opt) Equal to .keymap(opt) without a value for type

####.createShortcut(selector, keys, css, special) Call on a anchor tag to show a keybinding by hovering over or clicking on this.

######Parameters

  • selector - (Required) - Selector of the keymap
  • keys - (Required) - Array of keys for the keybinding
    • Format:
      • Number - keyCode of the key f.e. [88,89,90]
      • String - Value of the key given in the layout f.e. ["ctrl","alt","f"]
  • css - Either a class to style the keybinging with a stylesheet or color for the font color and background for the background-color
  • special: Special selector, f.e. :last or :first
Clone this wiki locally