No internet connection
  1. Home
  2. General

Right Alt not working in tinypilot's web interface

By Pawel Salkiewicz @psalkiewicz
    2021-09-17 17:06:45.081Z

    I’m using your Tinypilot software and I came across one issue. I connect to the remote laptop using tinypilot's web interface. USB on the go forwards keystrokes to the laptop and almost everything works fine. I can use shift and control keys (except for the ctrl-t ctrl-w keystrokes that trigger the browser). I can also use left alt which opens the menu. The thing that doesn’t work is right alt (also called Alt Gr in different countries). I’m using a polish keyboard layout which uses the right alt to type polish characters. Is there any way to make the right alt work over this browser client?

    • 16 replies

    There are 16 replies. Estimated reading time: 13 minutes

    1. Thanks for reporting this! Sorry for the delay.

      USB on the go forwards keystrokes to the laptop and almost everything works fine. I can use shift and control keys (except for the ctrl-t ctrl-w keystrokes that trigger the browser).

      If you're using Chrome, one workaround is to run it in App mode so that it doesn't capture browser hotkeys.

      I can also use left alt which opens the menu. The thing that doesn’t work is right alt (also called Alt Gr in different countries). I’m using a polish keyboard layout which uses the right alt to type polish characters. Is there any way to make the right alt work over this browser client?

      Hmm, it should just work. What happens when you push Alt Gr key combinations? Does it register or does nothing appear at all?

      Can you share a screenshot of what you see if you push the Alt Gr key on keycode.info? And can you also share your logs from System > Logs after you try typing the Alt Gr keystroke?

      1. Aabou @aboucher000
          2021-11-13 03:43:01.340Z

          Hi, this is a major problem for me as I am a French Canadian and use a French Canadian keyboard which uses alt-gr characters a lot.
          For example:
          alt-gr 2 should produce @ and produces nothing.
          On keycode.info, alt-gr 2 produce the following: 50, event.key @, event.location 0 (general keys), event.which 50, event.code Digit2
          In my system/log, there seem to be nothing interesting produced.
          What can I do more?
          Thank you!

          1. Thanks for reporting this!

            Alt+Gr should work without any other changes. Just to verify, is the target machine set to an fr-ca locale?

            alt-gr 2 should produce @ and produces nothing.
            On keycode.info, alt-gr 2 produce the following: 50, event.key @, event.location 0 (general keys), event.which 50, event.code Digit2

            Is this what you see when you're typing on a physical keyboard into the target computer or when you're typing through TinyPilot on the target computer? If it's with a physical keyboard, can you let me know what happens when you try the same through TinyPilot?

            Can you share your log from System > Logs > Get Shareable URL?

            1. Aabou @aboucher000
                2021-11-16 05:18:35.953Z

                Thank you for your answer (and your interest in my problem),

                I will try to express everything more clearly:

                Shareable log: https://logs.tinypilotkvm.com/CpY141qn

                typed directly on target machine:
                (running windows, using a french canadian physical keyboard, french canadian layout)

                press ALT+gr

                event.key: AltGraph
                event.location: 2 (Right-side modifier keys)
                event.which: 18
                event.code: AltRight

                press alt+gr and 2

                event.key: @
                event.location: 0 (general keys)
                event.which: 50
                event.code: Digit2

                typed directly on "source" machine (the one running the browser that hosts tinipilot)
                (running windows, using a french canadian physical keyboard, french canadian layout)
                -> same as directly on target machine

                on tinyPilot:
                (I run tinyPilot using Chrome from a windows machine that uses a french canadian physical keyboard, french canadian layout)

                press ALT+gr
                ->
                On the "bottom bar" of the tinyPilot window: [Control] [AltGraph]

                almost always, but not all the times (even if I NEVER press Control):

                event.key: Control
                event.location: 1 (Left-side modifier keys)
                event.which: 17
                event.code: ControlLeft
                -> displayed during about 2 seconds, then without touching anything:

                event.key: AltGraph
                event.location: 2 (Right-side modifier keys)
                event.which: 18
                event.code: AltRight
                -> after about 2 seconds, the [Control] [AltGraph] disapears from the "bottom bar"

                press alt+gr and 2

                event.key: AltGraph
                event.location: 2 (Right-side modifier keys)
                event.which: 18
                event.code: AltRight
                On the "bottom bar" of the tinyPilot window: [Control] [AltGraph] @
                -> displayed during about 2 seconds, then without touching anything:

                event.key: 2
                event.location: 0 (general keys)
                event.which: 50
                event.code: Digit2
                -> after about 2 seconds, the [Control] [AltGraph] @ disapears from the "bottom bar"

                1. Michael Lynch @michael2021-11-16 22:09:35.962Z2021-11-16 22:37:56.972Z

                  Thanks for sharing the logs and the detailed notes!

                  Sorry, I'm having trouble reproducing this. I set my Win10 machine to the fr-ca keyboard, but that's showing me that the key combination for @ is Shift/Maj+2 not Alt Graph.

                  Here's a video of what I'm seeing: https://storage.googleapis.com/tinypilot-scratch/tmp/tinypilot-fr-ca-keyboard.mp4

                  Edit: Scratch that. I think I'm seeing it. I'm investigating now.

                  1. Okay, I think I see what's going wrong here. I'm tracking it in this bug:

                    But do you have any idea why when I set my keyboard to fr-ca, the keystroke that generates @ is Shift+2, but you're seeing it as AltGr+2?

                    1. Aabou @aboucher000
                        2021-11-17 00:29:15.534Z2021-11-17 03:25:58.382Z

                        Hi Michael, I am glad you confirmed there is an actual problem.

                        For the fact that pressing shift+2 produces "@" on your keyboard,
                        I suspect that even if you have installed the "French - Canada" language, you may not have selected the French Canadian keyboard.
                        If you can see the language bar, on the right side of the task bar, click on it and make sure "French keyboard (Canada)" is selected.
                        To confirm that you are using the french canadian keyboard, you may also press the key that is located just on the left side of the right-shift key ("/").
                        This should produce a "é".

                        Just to be sure, here is a picture representing the french canadian keyboard layout:
                        https://i.stack.imgur.com/qNws6.png

                        Your can clearly see in BLUE what character should be produced when combining the corresponding key with Alt-gr.
                        Also, the character that is printed above the main character should be produced using Shift.
                        For example, on the picture, for the "2" key, you can see that shift+2 should produce a quote (") and alt-gr+2 should produce a @.

                        VERY interesting fact:
                        I have tried using tinyPilot's VIRTUAL keyboard and I get the GOOD result.
                        For example, pressing Alt-gr, then 2, produces @.
                        However, when using a physical keyboard, as mentioned previously, it still produces 2.

                        1. Interesting, I'm not sure why Win10 has a keyboard that doesn't match the French Canadian keyboard. I've selected French (Canada) as the language, and it's showing me a keyboard that has French characters, but it doesn't match the examples of fr-ca keyboards that you shared or that I see online.

                          I think there's a bug in how we track which modifier keys are pressed. We're working on identifying where the logic error is, but in the meantime, I'll email you a copy of the 2.2.2 image, which is the last build before we introduced modifier key tracking, so I think that might fix the issue you're seeing.

                          1. Aabou @aboucher000
                              2021-11-18 05:26:40.907Z

                              Hi Michael,
                              You were right: the image you sent me fixes the problem.
                              I will stay with this version until the problem is fixed in the latest one.

                              Thank you for your help.

                              1. Great, thanks for your patiene!

                                1. In reply toaboucher000:

                                  @aboucher000 - I just wanted to let you know that we fixed this bug. The next release (2.4.0) should be out later this month, and it will include this fix.

                2. G
                  In reply topsalkiewicz:
                  @gnu
                    2022-11-30 10:55:04.542Z

                    I have the exact same issue.
                    I tested this with a Windows as well as a Linux target: The same.
                    All keyboard layouts(my "source" PC as well as the targeted machines) are set to "Swiss German".
                    Characters where "Alt Gr" is required do not work, eg: \ @ | #
                    TinyPilot is on software version 2.5.0

                    1. David @david2022-11-30 20:32:25.252Z

                      Hi @gnu, sorry that you're also running into this keyboard issue.

                      I've just reproduced this problem on my own devices, so it seems likely to be a bug with TinyPilot's software. I'm not sure what the underlying issue is yet, but I'm looking into it.

                      Here's a screenshot showing the issue I've produced:

                      You can see the key history (bottom right) showing the key input has been interpreted correctly, but the text in the document is incorrect, despite using the Swiss German keyboard.

                      Does your TinyPilot show the correct input in the key history when you use alt Gr?

                      1. G@gnu
                          2022-12-01 07:39:49.833Z

                          Hello David

                          Thank you for the swift response.
                          Yes: It is exactly the same for me: The input is recognized correctly(as indicated on the key history), but what gets to the target is wrong.
                          It seems that the "Alt Gr" key is completely ignored.

                          1. David @david2022-12-01 13:21:42.118Z

                            Thanks for the confirmation! I've filed a bug on Github and I'll continue looking into this issue.

                            1. In reply tognu:
                              David @david2022-12-01 18:24:13.927Z

                              As a work around, you can use the right Alt key on TinyPilot's on-screen keyboard, along with the key you want to modify, to enter the correct character.