Single tap sends 2 chars, on first start
Same than #36.
This issue is very strange. I am starting wvkbd with systemd. If I reboot, the keyboard shows up and any input if sent twice. If I restart the service, the issue is gone. I tried various delays and options without much success so far.
For now, the only (ugly) workaround I found (at least it works) is:
So it starts wvkbd-mobintl, if that was the first start, it kills it and starts it again.
#!/bin/bash
# Define temporary state files
FLAG_FILE="/tmp/onscreen-keyboard-first-boot"
PID_FILE="/tmp/onscreen-keyboard.pid"
# Remove old PID file if it exists
rm -f "$PID_FILE"
# If first boot, create the flag
if [ ! -f "$FLAG_FILE" ]; then
echo "First boot detected, will restart once..."
touch "$FLAG_FILE"
FIRST_BOOT=true
else
FIRST_BOOT=false
fi
# Start the keyboard
/usr/bin/wvkbd-mobintl --landscape-layers simple -L 200 --press 00ff00 &
PID=$!
# Store PID
echo "$PID" > "$PID_FILE"
# If first boot, wait and restart once
if [ "$FIRST_BOOT" = true ]; then
sleep 1
echo "Restarting onscreen keyboard to fix double input issue..."
kill "$PID"
sleep 1
/usr/bin/wvkbd-mobintl --landscape-layers simple -L 200 --press 00ff00 &
echo "$!" > "$PID_FILE"
fi
wait "$PID"
On Sun Feb 2, 2025 at 4:16 PM CET, Chevdor wrote:
Same than #36.
This issue is very strange. I am starting wvkbd with systemd. If I reboot, the keyboard shows up and any input if sent twice. If I restart the service, the issue is gone. I tried various delays and options without much success so far.
Strange indeed, you're sure you're on the most recent wvkbd version? The issue you reference was fixed quite a while ago. I wonder if it's some kind of interplay with your wayland compositor (as I can't reproduce it), which are you running?
I am running Raspbian on a RPi4. I installed from apt.
I no longer have the machine in front of me, I will try to get you the exact versions if that help better than latest.
I kept on fiddling around to figure out a pattern but did not spot anything obvious. I am now using systemd to wait for chromium to start, then kill wvkbd and restart it.
We used the system too little so far for me to tell more. The first boots worked with my workaround. I am monitoring to see if this the workaround works reliably. Obviously, best would be to not need the workaround at all.