summaryrefslogtreecommitdiffstats
path: root/virtual-programs
diff options
context:
space:
mode:
authorOmar Rizwan <omar@omar.website>2024-01-29 19:33:23 +0000
committerOmar Rizwan <omar@omar.website>2024-01-29 19:33:23 +0000
commit49230a3de9e4ff774fe39296089bacccbcfb8ee8 (patch)
tree47fa74813c379dfac424acb8e51f60ba2d5afcfe /virtual-programs
parentkeyboard: Retract old key events. Drops should be fixed (w/o leaks) (diff)
downloadfolk-49230a3de9e4ff774fe39296089bacccbcfb8ee8.tar.gz
folk-49230a3de9e4ff774fe39296089bacccbcfb8ee8.zip
keyboard,KeyCodes: Ignore instead of ? for invalid key codes
Diffstat (limited to 'virtual-programs')
-rw-r--r--virtual-programs/keyboard.folk2
1 files changed, 2 insertions, 0 deletions
diff --git a/virtual-programs/keyboard.folk b/virtual-programs/keyboard.folk
index fbc895b0..829406c7 100644
--- a/virtual-programs/keyboard.folk
+++ b/virtual-programs/keyboard.folk
@@ -79,6 +79,8 @@ foreach keyboard $keyboardDevices {
if {$type == 0x01} { ;# EV_KEY
set shift [dict get $modifiers shift]
set key [keyFromCode $code $shift]
+ if {$key eq ""} { continue }
+
set keyState [lindex $KEY_STATES $value]
set isDown [expr {$keyState != "up"}]