mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 14:36:13 +01:00
25 lines
No EOL
625 B
Text
25 lines
No EOL
625 B
Text
/// @description
|
|
var trigger = false;
|
|
|
|
KEYBOARD_PRESSED = vk_nokey;
|
|
kb_time += DELTA_TIME;
|
|
if(kb_hold && kb_time >= PREFERENCES.keyboard_repeat_speed) {
|
|
trigger = true;
|
|
kb_time = 0;
|
|
} else if(!kb_hold && kb_time >= PREFERENCES.keyboard_repeat_start) {
|
|
trigger = true;
|
|
kb_time = 0;
|
|
kb_hold = true;
|
|
}
|
|
|
|
if(!trigger) exit;
|
|
|
|
KEYBOARD_PRESSED = kb_hkey;
|
|
|
|
if(keyboard_check(vk_backspace))
|
|
KEYBOARD_STRING = string_copy(KEYBOARD_STRING, 1, string_length(KEYBOARD_STRING) - 1);
|
|
else
|
|
KEYBOARD_STRING += keyboard_lastchar;
|
|
|
|
if(WIDGET_CURRENT && is_instanceof(WIDGET_CURRENT, textInput))
|
|
WIDGET_CURRENT.onKey(KEYBOARD_PRESSED); |