keyToAction
function keyToAction(keyCode: integer): integer;
getKeyClicked and getKeyPressed functions return the key code of the key pressed. However, different devices have different key mappings. For example, one device may have FIRE key return key code 100, and the other device may have its FIRE key return key code 120. To avoid this problem, you can use the keyToAction function that translates the key code into mapped game actions. keyToAction can return any of the following predefined values:
begin
while keyToAction(getKeyClicked) <> GA_FIRE do
begin
delay(100);
end;
end.
See also: getKeyPressed, getKeyClicked