mirror of
https://github.com/pikvm/pikvm.git
synced 2026-03-02 18:16:56 -05:00
Keyboard Layout Breaks After Pasting }" #1053
Labels
No labels
component:documentation
help wanted
resolution:delayed
resolution:duplicate
resolution:fixed
resolution:invalid
resolution:rejected
resolution:wontfix
success story
type:bug
type:bug
type:feature
type:question
type:question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pikvm-pikvm#1053
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 @PatrikElfstrom on GitHub (Jul 1, 2025).
Originally assigned to: @mdevaev on GitHub.
Describe the bug
Pasting a command containing }" causes the keyboard layout to break. After this point, all typed input produces incorrect characters, suggesting a layout or encoding mismatch.
To Reproduce
Steps to reproduce the behavior, like:
this is fine }" this is brokenExpected behavior
I expect to be able to paste }" and press any key after that and see the expected characters.
Screenshots
https://github.com/user-attachments/assets/ad5cb0bf-a4dd-4261-be5a-949b79ddd96d
Desktop (please complete the following information):
PiKVM info:
Additional context
@mdevaev commented on GitHub (Jul 1, 2025):
Hello. Which keymap was selected for paste?
Best regards,
Max Devaev
Вт, 1 июля 2025 г. в 12:24, Patrik Elfström @.***>:
@PatrikElfstrom commented on GitHub (Jul 1, 2025):
Sv was used
@mdevaev commented on GitHub (Jul 1, 2025):
Got it, I'll check.
@mdevaev commented on GitHub (Jul 15, 2025):
Okay, quick question. Does the AltGr key in the Swedish layout switch the input mode (like caps lock), or does it act while pressed (like shift)?
@PatrikElfstrom commented on GitHub (Jul 15, 2025):
It acts while pressed like shift.
@mdevaev commented on GitHub (Jul 15, 2025):
I don't quite understand what exactly breaks the input, is it the parenthesis character or is it the sequence of parentheses and quotation marks?
@PatrikElfstrom commented on GitHub (Jul 15, 2025):
The sequence.
One or the other does not break the input. But the two combined does.
It doesn't matter if I write them or paste them.
If I write a space between them it does not break.
@PatrikElfstrom commented on GitHub (Jul 15, 2025):
I get the same error with these keymaps:
cz, da, de, de-ch, es, fi, fo, fr-ca, fr-ch, hr, hu, is, it, lv, nl, no, pt, pt-br, sl, sv
but not the other ones.
The error can be triggered in Firefox, Safari and Chrome.
The error persists between browsers.
@mdevaev commented on GitHub (Nov 14, 2025):
Hello. Sorry for the late reply, this bug is tricky. Could you test a fresh version?
@mdevaev commented on GitHub (Nov 17, 2025):
Sup?
@PatrikElfstrom commented on GitHub (Nov 18, 2025):
Sorry, I will try to recreate the bug with the latest version in about 8 hours after work and I'll let you know how it goes. Thanks.
@PatrikElfstrom commented on GitHub (Nov 18, 2025):
Updated to the latest version and I can still reproduce the issue with the initial repro steps.
@mdevaev commented on GitHub (Nov 18, 2025):
Is the result exactly the same? I have a different one :/
@PatrikElfstrom commented on GitHub (Nov 18, 2025):
Yes, exactly the same. Same characters.
Interesting. What was different for you? What keymap did you use?
@mdevaev commented on GitHub (Nov 18, 2025):
I tried
svkeymap, and the same on the test target host. My test host is mac mini, maybe this is a reason. It has different sv keymaps and I tried all variations. All of them gave me incorrect results, but nothing similar to yours.@PatrikElfstrom commented on GitHub (Nov 18, 2025):
If I set us keyboard layout on my server and select us keymap it works.
If I use a swedish physical keyboard with swedish keyboard layout on the server I get the correct characters.
So something must be wrong with what pikvm sends.
I ran this:
sudo evtest /dev/input/event3 > keylog.txtto log the keypresses pikvm sentI first sent the string split up. So first I pasted
aaa}and then I pasted"aaa.And after that I pasted the full string
aaa}"aaa.And in the event log, with the first two pastes, we can see that
KEY_RIGHTALTis released beforeKEY_LEFTSHIFTwhich is expected.(value 1 is keydown and value 0 is keyup)
But when I pasted the full string and triggering the error, we can see that
KEY_RIGHTALTwas released afterKEY_LEFTSHIFTwas pressed.I don't know if this is the cause (because I don't know anything about this) but it was the only discrepancy I could find.
Logically, releasing
KEY_RIGHTALTafterKEY_LEFTSHIFTbut beforeKEY_2on a physical keyboard should still work but maybe it's different here.