summaryrefslogtreecommitdiffstats
path: root/virtual-programs
diff options
context:
space:
mode:
authorAndrés Cuervo <andrescuervor@gmail.com>2023-12-28 21:53:44 +0000
committerAndrés Cuervo <andrescuervor@gmail.com>2023-12-28 21:53:44 +0000
commitd4ae18e2e3e792b391a3070a1fcf1f4f1883e991 (patch)
treeb5fa502b4cd178a94aced790d3241451f96c9e61 /virtual-programs
parentFix cursor persistence to unmatching & LEFT at origin (diff)
downloadfolk-d4ae18e2e3e792b391a3070a1fcf1f4f1883e991.tar.gz
folk-d4ae18e2e3e792b391a3070a1fcf1f4f1883e991.zip
Allow for key repeating
Diffstat (limited to 'virtual-programs')
-rw-r--r--virtual-programs/editor.folk2
-rw-r--r--virtual-programs/keyboard.folk6
2 files changed, 4 insertions, 4 deletions
diff --git a/virtual-programs/editor.folk b/virtual-programs/editor.folk
index f378ec9b..034d2ade 100644
--- a/virtual-programs/editor.folk
+++ b/virtual-programs/editor.folk
@@ -170,7 +170,7 @@ proc getCurrentLineLength {lines cursor} {
When /page/ is a keyboard with path /kbPath/ & /page/ is an editor {
set id "$page$kbPath"
- Every time keyboard $kbPath claims key /currentCharacter/ is /keyState/ with modifiers /modifier/ & the $kbPath cursor is /cursor/ & $id has program code /code/ & $id has editor code /editorCode/ {
+ Every time keyboard $kbPath claims key /currentCharacter/ is /keyState/ with modifiers /modifier/ with rand /r/ & the $kbPath cursor is /cursor/ & $id has program code /code/ & $id has editor code /editorCode/ {
if {$keyState == "down" || $keyState == "repeat"} {
Commit "cursor$kbPath" {
switch $currentCharacter {
diff --git a/virtual-programs/keyboard.folk b/virtual-programs/keyboard.folk
index c52f119c..83c83a5e 100644
--- a/virtual-programs/keyboard.folk
+++ b/virtual-programs/keyboard.folk
@@ -53,7 +53,7 @@ foreach keyboard $keyboardDevices {
Start process "keyboard-$keyboard" {
source "pi/KeyCodes.tcl"
Wish $::thisProcess shares statements like \
- [list keyboard /kb/ claims key /k/ is /t/ with modifiers /m/]
+ [list keyboard /kb/ claims key /k/ is /t/ with modifiers /m/ with rand /r/]
variable evtBytes 16
variable evtFormat iissi
if {[exec getconf LONG_BIT] == 64} {
@@ -91,8 +91,8 @@ foreach keyboard $keyboardDevices {
}
set heldModifiers [dict keys [dict filter $modifiers value 1]]
- Retract keyboard $keyboardSpecifier claims key /k/ is /t/ with modifiers /m/
- Assert keyboard $keyboardSpecifier claims key $key is $keyState with modifiers $heldModifiers
+ Retract keyboard $keyboardSpecifier claims key /k/ is /t/ with modifiers /m/ with rand /r/
+ Assert keyboard $keyboardSpecifier claims key $key is $keyState with modifiers $heldModifiers with rand [rand]
Step
}
}