mirror of
https://github.com/jetkvm/kvm.git
synced 2026-03-02 22:58:00 -05:00
WebUI "Paste text" has problems with uppercase #60
Labels
No labels
component/keyboard-layout
component: cloud
component: device screen
component: extensions
component: hid/keyboard
component: hid/mouse
component: network
component: timesync
component: ui
component: updater
component: usb
component: usb/hid
component: usb/storage
component: video
component: webrtc
component: webserver
need-more-details
status: working-in-progress
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/kvm#60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jimcheetham on GitHub (Jan 17, 2025).
Possibly related to #30 ...
I noticed that a password that I was trying to paste into the remote machine wasn't working, and resorted to looking at it instead of just entering it at an unechoed input :-) When I pasted it somewhere visible, I could see that some capitalised letters were arriving as lowercase.
I've sent a few test strings, and because #30 said that you're sending a
shiftand then acharacter, I wonder if the timing if these is messed up somehow.I tried a couple of test strings, sending each one 5 times
Initial Caps For WordsCamelCase WordTestsWhat I got pasted into the remote machine was reasonably non-deterministic ...
My machine is
App: 0.3.5-dev202501022149
System: 0.2.0
(It would be very nice if I could copy/paste that rather than having to retype it)
@dlorch commented on GitHub (May 3, 2025):
Text from the "Paste text" text box will be sent character-by-character to the target system by simulating keystrokes. The above should translate to:
See the code here:
github.com/jetkvm/kvm@d79f359c43/ui/src/components/popovers/PasteModal.tsx (L48-L60)There shouldn't be a timing issue between
shiftand thecharacter, as they are sent at the same time. Could you provide thekeyboardReportlog entries for review? They look something like this:@jimcheetham commented on GitHub (May 3, 2025):
Where do I find
keyboardReportlogs? I cannot find a mention of these on the Discord, and there's nothing interesting in/var/logon the KVM itself ...@dlorch commented on GitHub (May 4, 2025):
You can get trace (
TRC) log output by re-building the entire solution and running the application in debug mode. The logs are then sent to the terminal:@dlorch commented on GitHub (May 4, 2025):
The logging code in the dev branch has changed quite a bit since the latest app release (0.3.9). The JetKVM app developers have rewritten quite a big portion of that code. What you are seeing above is tracing output generated by the latest code.
In the future, you will be able to manually set the parameter
default_log_leveltoTRACEin/userdata/kvm_config.jsonand then view the logs in/userdata/jetkvm/last.log.The only tricky part will be to run
kill jetkvm_appbefore manually making changes to the config file, to prevent the app from overwriting the file with the settings that are in memory (CC: @ym).@adamshiervani commented on GitHub (Jul 15, 2025):
A lot has changed since this issue was created. @jimcheetham, without running the software with different log levels, could you do a quick check to see whether this is still an issue on the latest version?
@jimcheetham commented on GitHub (Jul 16, 2025):
Yep, I'm still having this issue. FW version in use is now autoupdated to 0.4.7-dev202507031912 ...
It looks like this version supports TRACE logging as per the comment above, so I enabled it. Annoyingly there doesn't seem to be any scp support on the machine, so getting it out was a challenge. I grepped for 'TRC jetkvm jsonrpc' and had to copy/paste from the terminal buffer :-)
Looking at the logs (attached) I can see that everything looks consistent, even when the results vary. For example, I sent the text "Initial Caps For Words" 5 times, and the middle 3 times I saw a lower-case 'f' arrive; but the TRC logs indicate that
{"keys":[9],"modifier":2}was recorded every time.I'm assuming that no-one else has duplicated this issue, so it's increasingly likely to be something about the machine at the other end, rather than the JetKVM itself?
cat > pasteresult.txt- pasteresult.txtlast.log, selecting just the TRC jsonrpc lines and excluding Mouse data - TRCkeyboard.log@Jonher937 commented on GitHub (Jul 16, 2025):
I've been following this issue and would like to add that this is not only limited to pasting text.
Most of the time I'm using JetKVM on the same LAN ethernet -> ethernet and it's fine, or at least happens very seldom.
As soon as you add latency, you start having issues with out of order characters, Shift not engaging the correct characters, sometimes shift sticks for a few chars and sometimes it's missed.
Having typed Shift+A and releasing the Shift key too quickly after pressing a you'll sometimes get:
aaaaaaaaaaprinted after theA.TL;DR: This is probably reproducible if you add latency between yourself and the JetKVM
@jimcheetham commented on GitHub (Jul 16, 2025):
As you mention latency @Jonher937, I'm also now noticing that normal typing via the JetKVM is also acting in a similar manner, I'm getting extra characters and typos that I'm confident weren't caused by my fingers. So it isn't something related to just the paste function, it may be more generally about how keystrokes are sent (to clarify, I don't usually use the JetKVM to type much into this computer, it's primarily for mouse input to a browser, so I may not have noticed this before).
I checked paste into a different application, the gnome 'text editor', and it also showed the same non-caps behaviour (although no extra/repeats).
I ran
xev, which produces detailed keystroke data from an input X window. Unfortunately it produces only a log output, and I can't see my typing echoed to see if the non-caps thing was happening; the logged key events all seem to be perfectly correct.xev.log
On the other hand, it does show that X is seeing the SHIFT_L and letter keys being pressed simultaneously (according to timestamp) and later, released simultaneously ... perhaps we have a timing issue on the remote machine that could benefit from slowing down the rate at which we send keys?
@jimcheetham commented on GitHub (Dec 18, 2025):
App 0.5.1-dev202512181609, System 0.2.7 is now on my kvm, and it looks like the (new to me) paste system with the default 20ms delay is working well - my original test of 10 lines of text is working correctly.
Pushing the delay down to 1ms does introduce some errors similar to the original problem - but more suggesting that the SHIFT is applied to an immediately preceding key-press, rather than the original difficult-to-characterise behaviour)
So the current state on this dev release seems to address the reported problem, and in a general way.
@Jonher937 commented on GitHub (Dec 18, 2025):
Can confirm the paste feature (and regular input) is solid for me too since 0.4.9