New icons and types

This commit is contained in:
barsdeveloper
2022-11-16 23:01:57 +01:00
parent 704049c869
commit 8e2f44bd0d
22 changed files with 324 additions and 111 deletions

View File

@@ -22,6 +22,7 @@ export default class IKeyboardShortcut extends IInput {
constructor(target, blueprint, options = {}) {
options.activateAnyKey ??= false
options.activationKeys ??= []
options.consumeEvent ??= true
options.listenOnFocus ??= true
options.unlistenOnTextEdit ??= true // No shortcuts when inside of a text field
if (!(options.activationKeys instanceof Array)) {
@@ -62,6 +63,7 @@ export default class IKeyboardShortcut extends IInput {
)
) {
if (options.consumeEvent) {
e.preventDefault()
e.stopImmediatePropagation()
}
self.fire()