Changes

Jump to: navigation, search

Programming:Keyboard scanning

894 bytes added, 09:51, 5 February 2010
/* Hardware scancode table */
|'''&49''' || DEL || - || - ||Joy1 Fire||Joy1 right||Joy1 left||Joy1 down||Joy1 up
|}
 
 
== Developing programs that use joystick ==
 
In the CPC world it is more common that a game supports both keyboard and digital joystick for those users who don't own joysticks.
In addition, it is also nice if the keys could be redefined but that is not necessary.
 
There are some common keyboard configurations used:
 
* '''Cursor keys & SPACE''' - This configuration is often used and is great for the CPC6128 and Plus and playing using emulators. This is '''not''' good for CPC 464 and 664 (which have uncomfortably arranged cursor keys)
 
* '''Q,A,O,P,SPACE''' - (Q up, A down, O left, P right, SPACE fire) This is a good solution, and it's a sort of standard (used by many games). It is best for english QWERTY keyboards, on french AZERTY it'd be A-Q-O-P (but because the decoding of the keys is done in software, normally by the OS, the bits in the keyboard matrix are actually the same).
== One line scanning routine ==
2,562
edits