Creates the given keyboard layout, assiging the correct sizes and positions to keys.
It returns an array of raw keys so that if you're extending Key you can create them with your extended class (you should override Key.create).
Labels are assigned for most keys in english as a fallback, see labelWithEvent/labelWithKeyboardMap for proper labeling during runtime.
Currently only supports generating the following layouts: ansi, iso. Technically the layout returned is a variation of these that includes half height 1.3333u (4u / 3 keys) media keys over the numpad.
You can remove sections using the options. Note that this just removes them and does not do any repositioning. If you only remove the numpad, for example, the media keys will still be placed above it. The idea is to easily allow reducing the size of the created layout to then adjust only a few keys to your liking.
Also note the navigation section is split into two sections with navigation only refering to the 6 Insert, Home, etc. keys, and arrowKeys refering to the arrow keys.
This also adds the following classes to some keys: center-label for media and arrow keys, and iso-enter for the iso enter which requires a different approach to styling (see the demo, it's painful).
Creates the given keyboard layout, assiging the correct sizes and positions to keys.
It returns an array of raw keys so that if you're extending Key you can create them with your extended class (you should override Key.create).
Labels are assigned for most keys in english as a fallback, see labelWithEvent/labelWithKeyboardMap for proper labeling during runtime.
Currently only supports generating the following layouts:
ansi
,iso
. Technically the layout returned is a variation of these that includes half height 1.3333u (4u / 3 keys) media keys over the numpad.Pull requests for standard layouts welcomed.
You can remove sections using the options. Note that this just removes them and does not do any repositioning. If you only remove the numpad, for example, the media keys will still be placed above it. The idea is to easily allow reducing the size of the created layout to then adjust only a few keys to your liking.
Also note the
navigation
section is split into two sections withnavigation
only refering to the 6Insert
,Home
, etc. keys, andarrowKeys
refering to the arrow keys.This also adds the following classes to some keys:
center-label
for media and arrow keys, andiso-enter
for the iso enter which requires a different approach to styling (see the demo, it's painful).