keyboard_get_map

Gets the currently mapped ascii code for the selected key.

Syntax:

keyboard_get_map(key);


Argument Description
key This is the key that you wish to get the mapped value from


Returns: Real


Description

Sometimes you may wish to get the ascii code for a mapped key (to see if it is already mapped, for example) which is what this function returns.


Example:

if keyboard_get_map(ord("A")) = ord("A")
   {
   keyboard_set_map(ord("A"), keyboard_lastkey);
   }

The above example code will first check and see if "A" has been mapped to another key, and if it hasn't it will map it to the last key that the user has pressed.


Back: Keyboard Input
Next: keyboard_unset_map
© Copyright YoYo Games Ltd. 2018 All Rights Reserved