AltGr + key not working #406

Open
opened 2026-02-20 08:22:32 -05:00 by deekerman · 11 comments
Owner

Originally created by @enzo-digex on GitHub (Sep 19, 2025).

Disclaimer

  • I have read and understood the disclaimer.

Application version

0.4.6

System version

0.2.5

Device model

JetKVM

Extension model

None

Remote device Hardware

No response

Remote device OS

Windows 11

Bug description

Keyboard Layout: Swiss German

Steps to reproduce
Press "Right Alt + ^"

Expected Result
On the remote system, I get a "tilde" (~)

Observed Result
Nothing happens and the keyboard inputs stuck or are repeated till I press any key.

Originally created by @enzo-digex on GitHub (Sep 19, 2025). ### Disclaimer - [x] I have read and understood the disclaimer. ### Application version 0.4.6 ### System version 0.2.5 ### Device model JetKVM ### Extension model None ### Remote device Hardware _No response_ ### Remote device OS Windows 11 ### Bug description Keyboard Layout: Swiss German **Steps to reproduce** Press "Right Alt + ^" **Expected Result** On the remote system, I get a "tilde" (~) **Observed Result** Nothing happens and the keyboard inputs stuck or are repeated till I press any key.
Author
Owner

@walter824 commented on GitHub (Oct 13, 2025):

Problem is present also in App 0.4.9 dev and System 0.2.6, but now alt+gr+@ write ^@

(Italian Keyboard layout)

@walter824 commented on GitHub (Oct 13, 2025): Problem is present also in App 0.4.9 dev and System 0.2.6, but now alt+gr+@ write ^@ (Italian Keyboard layout)
Author
Owner

@Riyooo commented on GitHub (Nov 16, 2025):

I have a similar issue with a French keyboard, pressing AltGr + 0 should give @ but it outputs nothing (attached screenshot).

When I press AltGr the pressed keys show: "ControlLeft + AltRight + AltGr", but when I press AltGr on the virtual keyboard (which works) the pressed keys show: "AltRight + AltGr" only so no ControlLeft. As a result none of these special characters can be made using my physical keyboard ~#{[|`^@]}

I tried changing device identifiers just in case, without success.
Also I noted that the virtual keyboard is not in french although the button at its top right shows "français" (French). It seems to be in English layout (Qwerty).

Image

@Riyooo commented on GitHub (Nov 16, 2025): I have a similar issue with a French keyboard, pressing AltGr + 0 should give @ but it outputs nothing (attached screenshot). When I press AltGr the pressed keys show: "ControlLeft + AltRight + AltGr", but when I press AltGr on the virtual keyboard (which works) the pressed keys show: "AltRight + AltGr" only so no ControlLeft. As a result none of these special characters can be made using my physical keyboard ~#{[|`\^@]} I tried changing device identifiers just in case, without success. Also I noted that the virtual keyboard is not in french although the button at its top right shows "français" (French). It seems to be in English layout (Qwerty). ![Image](https://github.com/user-attachments/assets/72746238-b7e9-44e8-bb48-f7ab04f5d7ed)
Author
Owner

@adamshiervani commented on GitHub (Nov 17, 2025):

@IDisposable can you take a look at this issue?

@adamshiervani commented on GitHub (Nov 17, 2025): @IDisposable can you take a look at this issue?
Author
Owner

@walter824 commented on GitHub (Nov 17, 2025):

This issue makes JetKVM partially useless..

Il giorno lun 17 nov 2025 alle ore 10:10 Adam Shiervani <
@.***> ha scritto:

adamshiervani left a comment (jetkvm/kvm#812)
https://github.com/jetkvm/kvm/issues/812#issuecomment-3540697234

@IDisposable https://github.com/IDisposable can you take a look at this
issue?


Reply to this email directly, view it on GitHub
https://github.com/jetkvm/kvm/issues/812#issuecomment-3540697234, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/BYVSABVXJHGJB3FP7VBJQET35GGIRAVCNFSM6AAAAACG6JDJEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNBQGY4TOMRTGQ
.
You are receiving this because you commented.Message ID:
@.***>

--
Walter Dallari
@.***
+39 348 450 2928

@walter824 commented on GitHub (Nov 17, 2025): This issue makes JetKVM partially useless.. Il giorno lun 17 nov 2025 alle ore 10:10 Adam Shiervani < ***@***.***> ha scritto: > *adamshiervani* left a comment (jetkvm/kvm#812) > <https://github.com/jetkvm/kvm/issues/812#issuecomment-3540697234> > > @IDisposable <https://github.com/IDisposable> can you take a look at this > issue? > > — > Reply to this email directly, view it on GitHub > <https://github.com/jetkvm/kvm/issues/812#issuecomment-3540697234>, or > unsubscribe > <https://github.com/notifications/unsubscribe-auth/BYVSABVXJHGJB3FP7VBJQET35GGIRAVCNFSM6AAAAACG6JDJEKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTKNBQGY4TOMRTGQ> > . > You are receiving this because you commented.Message ID: > ***@***.***> > -- Walter Dallari ***@***.*** +39 348 450 2928
Author
Owner

@Riyooo commented on GitHub (Nov 17, 2025):

@adamshiervani I tried looking into this issue and it seems to be caused by a particularity of windows, which always emits an extra synthetic ControlLeft event before every AltGr. Most targets don't interpret this as AltGr, so special characters fail to type.

As an example, pressing ControlLeft + AltGr + Digit0 on the virtual keyboard produces nothing, while doing so physically in Windows results in a special character as it also always interprets AltGr + Key as a special combination, wether there's a Control event with it or not.

I have deployed a small fix to my JetKVM device, which tries to detect and suppress that synthetic ControlLeft, and seems to work. Would you be interested in a pull request once I finish testing it ?

@Riyooo commented on GitHub (Nov 17, 2025): @adamshiervani I tried looking into this issue and it seems to be caused by a particularity of windows, which always emits an extra synthetic ControlLeft event before every AltGr. Most targets don't interpret this as AltGr, so special characters fail to type. As an example, pressing ControlLeft + AltGr + Digit0 on the virtual keyboard produces nothing, while doing so physically in Windows results in a special character as it also always interprets AltGr + Key as a special combination, wether there's a Control event with it or not. I have deployed a small fix to my JetKVM device, which tries to detect and suppress that synthetic ControlLeft, and seems to work. Would you be interested in a pull request once I finish testing it ?
Author
Owner

@adamshiervani commented on GitHub (Nov 17, 2025):

@Riyooo - A PR fixing this would be marvelous. If you keep it small and easily testable - we can merge it quickly. Appreciate it!

@adamshiervani commented on GitHub (Nov 17, 2025): @Riyooo - A PR fixing this would be marvelous. If you keep it small and easily testable - we can merge it quickly. Appreciate it!
Author
Owner

@IDisposable commented on GitHub (Nov 19, 2025):

As far as I can see, the special-casing code for AltGr was deleted a long time ago. There's nothing in 0.4.10 or later that does a forced LeftCtrl.

@IDisposable commented on GitHub (Nov 19, 2025): As far as I can see, the special-casing code for AltGr was deleted a long time ago. There's nothing in 0.4.10 or later that does a forced LeftCtrl.
Author
Owner

@eeyoresan commented on GitHub (Nov 20, 2025):

This is a common issue, when using non US-keyboards mainly on Laptops. There are a number of reports regarding this issue for lots of Software's.

Would it be possible to add add some configuration to map the combination of "CtrlLeft, AltRight, AltGr" to just "AltGr" or possible "AltRight+ AltGr" which is sent from the virtual keyboard?

If so this solution can be tested by users having this issue.

@eeyoresan commented on GitHub (Nov 20, 2025): This is a common issue, when using non US-keyboards mainly on Laptops. There are a number of reports regarding this issue for lots of Software's. Would it be possible to add add some configuration to map the combination of "CtrlLeft, AltRight, AltGr" to just "AltGr" or possible "AltRight+ AltGr" which is sent from the virtual keyboard? If so this solution can be tested by users having this issue.
Author
Owner

@IDisposable commented on GitHub (Nov 20, 2025):

What version are you running? There's no special case handling for AltGr, it's just sent through as the modifiers given by the browser.

@IDisposable commented on GitHub (Nov 20, 2025): What version are you running? There's no special case handling for AltGr, it's just sent through as the modifiers given by the browser.
Author
Owner

@eeyoresan commented on GitHub (Nov 21, 2025):

Sorry, forgot to add versions

App: 0.4.8
System: 0.2.5

Since the key codes are printed as debug info at the bottom of the page I assumed they are read by the application before being sent to the device.

As show below when pressing AltGr on my keyboard CtrlLeft is also detected and sent to the device:
Image

This is the behavior when virtual keyboard is used (no CtrlLeft is visible)
Image

If the buffer is printed before sending it to the device, would it be possible to remove CtrlLeft if you get it combined with AltGr,AltLeft?

@eeyoresan commented on GitHub (Nov 21, 2025): Sorry, forgot to add versions App: 0.4.8 System: 0.2.5 Since the key codes are printed as debug info at the bottom of the page I assumed they are read by the application before being sent to the device. As show below when pressing AltGr on my keyboard CtrlLeft is also detected and sent to the device: <img width="1593" height="1143" alt="Image" src="https://github.com/user-attachments/assets/44b0a2d2-448e-4e9b-9715-910e24a1d381" /> This is the behavior when virtual keyboard is used (no CtrlLeft is visible) <img width="1579" height="1126" alt="Image" src="https://github.com/user-attachments/assets/d985492f-618e-4891-9d61-5e906bce3483" /> If the buffer is printed before sending it to the device, would it be possible to remove CtrlLeft if you get it combined with AltGr,AltLeft?
Author
Owner

@IDisposable commented on GitHub (Nov 21, 2025):

The Keys: shown reflects the is not characters, but HID codes by name which is mildly confusing. It is the keyswitch being pressed/held (e.g. the HID code being pressed). Since the AltGr and the AltRight are the exact same HID code, we "match" both of them and thus display both when translating the HID code back to a printable string... but in reality only the modifier state (the bitmask of which modifiers are active) and the keys-down HID codes are being sent... only the AltGr/AltRight keys-down HID code. See the code in InfoBar.tsx

In the bottom screen, you pressed the AltGr key (as defined by your Keyboard selecting in settings), and that key emits the AltGr HID code, which is the exact same numerical value as the AltRight key (gee, thanks IBM / HID committee!) so we don't really know a difference so it shows both.

The top screen is because Windows+Broswer is decomposing the actual physical AltGr key event into a ControlLeft key press event, then an AltRight key press event, so both keys are down, which we display (and again show both AltRight and AltGr).

I should tweak the code in InfoBar to figure out which key is "possible" from the layout and not print both. One way to do that is treat AltGr as if it was distinct key until the very last moment where we're emitting the HID codes in the USB write.

My next big change will be revamping this keyboard to allow any layout and properly display based on the Keyboard Layout/Locale and I'll fix this then.

There's far more detail than anyone should care about in this comment

@IDisposable commented on GitHub (Nov 21, 2025): The `Keys:` shown reflects the is not _characters_, but _HID codes by name_ which is mildly confusing. It is the keyswitch being pressed/held (e.g. the HID code being pressed). Since the AltGr and the AltRight are the _exact same_ HID code, we "match" both of them and thus display both when translating the HID code back to a printable string... but in reality only the modifier state (the bitmask of which modifiers are active) and the keys-down HID codes are being sent... only the AltGr/AltRight keys-down HID code. See the code in [InfoBar.tsx](https://github.com/jetkvm/kvm/blob/dev/ui/src/components/InfoBar.tsx#L35-L48) In the _bottom_ screen, you pressed the AltGr key (as defined by your Keyboard selecting in settings), and that key emits the AltGr HID code, which is the _exact same_ numerical value as the AltRight key (gee, thanks IBM / HID committee!) so we don't really know a difference so it shows both. The _top_ screen is because Windows+Broswer is decomposing the actual physical AltGr key event into a ControlLeft key press event, then an AltRight key press event, so both keys are down, which we display (and again show both AltRight and AltGr). I should tweak the code in InfoBar to figure out which key is "possible" from the layout and not print both. One way to do that is treat AltGr as if it was distinct key until the very last moment where we're emitting the HID codes in the USB write. My next big change will be revamping this keyboard to allow any layout and properly display based on the Keyboard Layout/Locale and I'll fix this then. There's far more detail than anyone should care about in [this comment](https://github.com/jetkvm/kvm/issues/649#issuecomment-3340597420)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/kvm#406
No description provided.