mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-01-22 09:52:50 +00:00
fix: disallow null inputs when editing
feat: allow special inputs while creating a chord input fixes #93
This commit is contained in:
@@ -28,7 +28,12 @@
|
||||
function keydown(event: KeyboardEvent) {
|
||||
if (!editing) return
|
||||
event.preventDefault()
|
||||
pressedKeys.add(inputToAction(event, get(serialPort)?.device === "X")!)
|
||||
const input = inputToAction(event, get(serialPort)?.device === "X")
|
||||
if (input == undefined) {
|
||||
alert("Invalid key")
|
||||
return
|
||||
}
|
||||
pressedKeys.add(input)
|
||||
pressedKeys = pressedKeys
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user