Skip to content
Andr3as edited this page Aug 15, 2015 · 10 revisions

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

##Create your own keymap layout Missing a special layout. Create your own one!

##Troubleshooting Some common errors and their solutions.

##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"

######Result

  • obj - {Object} - Dom object

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

######Result

  • obj - {Object} - Dom object

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

######Result

  • obj - {Object} - Dom object

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

######Parameters

  • selector - (Required) - {String} - Selector of the keymap
  • keys - (Required) - {Array} - Array of keys for the keybinding
    1. Format: Number - keyCode of the key f.e. [88,89,90] or String - Value of the key given in the layout f.e. ["ctrl","alt","f"]
  • css - (optional) - {Object} - Attributes to style the active keys Either * class - {String} - Class to add every active key, usable to style the keybinging with a stylesheet * color - {String}/{Number} - Font color * background - {String}/{Number} - Background color
  • special - (optional) - {String} - Special selector, f.e. :last or :first

######Result

  • obj - {Object} - Dom object
Clone this wiki locally