mirror of
https://github.com/hodgef/simple-keyboard.git
synced 2025-02-21 00:23:02 +08:00
Added button hold support for arrow buttons. Fixes #548
This commit is contained in:
parent
eb0411d057
commit
2394510f92
@ -330,12 +330,17 @@ class SimpleKeyboard {
|
||||
this.holdTimeout = setTimeout(() => {
|
||||
if (
|
||||
this.isMouseHold &&
|
||||
// TODO: This needs to be configurable through options
|
||||
((!button.includes("{") && !button.includes("}")) ||
|
||||
button === "{delete}" ||
|
||||
button === "{backspace}" ||
|
||||
button === "{bksp}" ||
|
||||
button === "{space}" ||
|
||||
button === "{tab}")
|
||||
button === "{tab}") ||
|
||||
button === "{arrowright}" ||
|
||||
button === "{arrowleft}" ||
|
||||
button === "{arrowup}" ||
|
||||
button === "{arrowdown}"
|
||||
) {
|
||||
if (this.options.debug) console.log("Button held:", button);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user