rawkey codes

### The keyboard RAWKEY codes

All keys used with WHDLoad must be specified as raw key codes.

Therefore here is a table which shows all the rawkeys in hexadecimal notation:

for comparision here is the us keymap:

here the french keymap:

and here the german keymap:

### The button codes

Starting with WHDLoad version 16.8 it's also possible to quit WHDLoad using a button on the mouse, joystick or joypad. For this there are special rawkeys defined listed in the table below. These rawkeys are only working with the QuitKey option, not with any other key option.
To make WHDLoad able to detect a button press the option NoVBRMove must not be used, the CPU must be at least a 68010 and the installed program must have the vertical blank interrupt enabled.
The rawkeys are listed in hexadecimal and decimal notation.
Using buttons from a joypad ($103..$109/$113..$119) as a QuitKey will make it impossible for the installed program to detect/check/use a joypad. The installed program will think a joystick is connected. This is because of some hardware limitations that the joypad can only checked once during a 1/50 second. So dont use it for games which require a joypad.

rawkey port 0 usually mouse | rawkey port 1 usually stick/pad | Mouse | Joystick | Joypad | Megadrive | Master System TecnoPlus
--- | --- | --- | --- | --- | --- | ---
$100/256 | $110/272 | left button | fire | Red/Select | B | A
$101/257 | $111/273 | right button | second fire | Blue/Stop | C | B
$102/258 | $112/274 | middle button
$103/259 | $113/275 |  |  | Play
$104/260 | $114/276 |  |  | Reverse/Left Ear
$105/261 | $115/277 |  |  | Forward/Right Ear
$106/262 | $116/278 |  |  | Green/Shuffle
$107/263 | $117/279 |  |  | Yellow/Loop
$108/264 | $118/280 |  |  | Red/Select
$109/265 | $119/281 |  |  | Blue/Stop

In the WHDLoad versions 16.4 - 16.7 it was possible to use a QuitKey of $73 to exit via pressing the left mouse button. This no longer works in WHDLoad version 16.8 and later. The new rawkey code $100 for that must be used instead.