PMC simplifies the keyboard in order to aid rapid development. There are few rules that this includes:
- All keys are in the same case, so pressing 'a' and 'A' will both map to the same key.
- Duplicate keys map to the same key, so pressing '8' on the numberpad is the same as pressing '8' on the keyboard top row.
- Key names are case insensetive, to 'space', 'Space', 'SPACE' and 'sPaCe' all map the same space key.
Keys of a single character, for example 'w', 'a', 's', 'd, 'e', '0', '1', '2', etc, can all be queried using those characters.
if getControls().isKeyDown( :w )
However some keys have a full name, and these are:
- f1, f2, f3, f4, f5, f6, f7, f8, f9, f10, f11, f12
- caps lock
- page up
- page down
c = getControls()
if c.isKeyDown( 'left' )
else if c.isKeyDown( 'right' )