Pixel-Composer/scripts/control_function/control_function.gml
2022-12-22 09:09:55 +07:00

27 lines
519 B
Plaintext

#region keyboard
enum KEYBOARD_STATUS {
idle,
down,
pressing,
up
}
globalvar CTRL, ALT, SHIFT;
CTRL = KEYBOARD_STATUS.idle;
ALT = KEYBOARD_STATUS.idle;
SHIFT = KEYBOARD_STATUS.idle;
function key_release() {
CTRL = KEYBOARD_STATUS.up;
ALT = KEYBOARD_STATUS.up;
SHIFT = KEYBOARD_STATUS.up;
keyboard_key_release(vk_control);
keyboard_key_release(vk_shift);
keyboard_key_release(vk_alt);
}
function key_mod_press(key) {
return key == KEYBOARD_STATUS.pressing;
}
#endregion