keyboard_set_map(key1,key2)

From ENIGMA
Jump to navigation Jump to search

Description

Maps the value of one key to another, this is useful in cases where you want to use both the arrow keys and WASD, and instead of duplicating the code you can simply map the keys together.

Parameters

Parameter Data Type Description
key1 integer key to map
key2 integer key to map to

Return Values

void: This function does not return anything.

Example Call

// demonstrates mapping directional keys
keyboard_set_map(ord('W'), vk_up);
keyboard_set_map(ord('A'), vk_left);
keyboard_set_map(ord('S'), vk_down);
keyboard_set_map(ord('D'), vk_right);