Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AltGr sending Control_L + Alt_L from client, on a Microsoft Azure VM #1856

Closed
MBD62 opened this issue Oct 22, 2024 · 41 comments
Closed

AltGr sending Control_L + Alt_L from client, on a Microsoft Azure VM #1856

MBD62 opened this issue Oct 22, 2024 · 41 comments
Labels
notourbug This issue needs to be resolved elsewhere

Comments

@MBD62
Copy link

MBD62 commented Oct 22, 2024

Describe the bug
It looks to me like the TigerVNC viewer sends something different when pressing AltGr than the RealVNC viewer does. (German keyboard)

To Reproduce
Steps to reproduce the behavior:
To reproduce this, a setup with an Azure Windows-VM used for accessing an Azure Linux-VM would be necessary. If trials need to be made, I'd of course be happy to assist but can't grant access to our VMs. The hope is that someone who understands the code, particularly around keyboard-mapping, can figure out what may be going wrong.

Expected behavior
Pressing Alt Gr would be recognized as "ISO_Level3_Shift"

Screenshots

Client (please complete the following information):

  • OS: Windows 11 Enterprise multi-session)
  • VNC client: TigerVNC
  • VNC client version: 1.14.0
  • Client downloaded from: sourceforge.net

Server (please complete the following information):

  • OS: AlmaLinux 9.1
  • VNC server: TigerVNC
  • VNC server version:1.13.1
  • Server downloaded from: AlmaLinux repository
  • Server was started using: Started at boot, after having executed systemctl enable vncserver@:77.service.

Additional context
As described in #1818 , typing in general started working when setting the keyboard to "German" instead of "Auto" in the Azure settings. However, anything involving Alt Gr still types nothing. A RealVNC viewer and a TightVNC viewer both work fine in the same setup.

Output of xev in the Linux-session and the Viewer log-file in Windows both agree with the fact that pressing Alt Gr sends Control_L + Alt_L (keycode 37 (keycode 37 (keysym 0xffe3, Control_L) and keycode 64 (keysym 0xffe9, Alt_L). Pressing the left Alt-key sends the same, just without the Control_L: keycode 64 (keysym 0xffe9, Alt_L) The keycode/keysym combos are the same in the Windows viewer logfile as are shown by xev. (suggesting that, for some reason, the viewer is sending the wrong thing?)

A current workaround is to use xmodmap -e "keycode 96 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift" , for example. On my keyboard I then hold down to type the characters requiring Alt Gr. When others use the same VM, who have perhaps Italian or French keyboards, it would have to be figured out what they may have for useable keys to apply xmodmap on so that is suboptimal.
I tried setting the server to use the rawkeyboard option but that does not change the behavior.

Another workaround, of course, could be to use one of the other viewers, but the combo Tiger server and Tiger viewer has its advantages.... Curiously enough, #1715 and #1751 both seem to describe the opposite problem, TigerVNC viewer working fine but other viewers failing.

Any ideas?

thx in advance + best regards / Mats

@MBD62
Copy link
Author

MBD62 commented Oct 22, 2024

I apparently did something wrong trying to insert links to other issues, maybe this works: #1715 , #1751 , #1818

@CendioOssman
Copy link
Member

AltGr is unfortunately very buggy on Windows. So my guess would be that you are not getting a proper emulation of the Windows behaviour in that Windows VM.

How are you accessing the Windows VM? Microsoft's RDP client?

A client debug log would be helpful:

https://github.com/TigerVNC/tigervnc/wiki/Debug-Logs#client-1

@MBD62
Copy link
Author

MBD62 commented Oct 22, 2024

Hi CendioOssman,
access is through a Web-browser but yes, RDP apparently does it in the background.
vncviewer.log

The attached logfile was with a session with the following keystrokes:
<RETURN>
<AltGr> + <\> (produces nothing)
<RETURN>
<F12> + <\> (produced "" in the terminal, which responded with "?"
<RETURN>
<Alt>
<RETURN>
(I hope I got the order right....)
Thx

@MBD62
Copy link
Author

MBD62 commented Oct 22, 2024

Oh, I violated some syntax, so it did not come out right: Between each keystroke I hit the return-key, the keys I hit were AltGr + backslash, got nothing, then F12 +backslash, got backslash and the terminal was confused. Last I hit the left Alt-key.

@MBD62
Copy link
Author

MBD62 commented Oct 23, 2024

AltGr is unfortunately very buggy on Windows. So my guess would be that you are not getting a proper emulation of the Windows behaviour in that Windows VM.

How are you accessing the Windows VM? Microsoft's RDP client?

A client debug log would be helpful:

https://github.com/TigerVNC/tigervnc/wiki/Debug-Logs#client-1

The TightVNC- and RealVNC-viewers are working OK. Does this mean that they internally translate things differently from how the TigerVNC-viewer does it or do, when they are in use, other keycodes/keysyms come out?

Back when collecting a viewer-log for #1818 the RealVNC viewer log showed no keystrokes, as far as I could tell. I will make a log with TightVNC and see if that shows something on keytrokes.

@MBD62
Copy link
Author

MBD62 commented Oct 23, 2024

I failed to create a logfile with the TightVNC viewer. The executable has an option -logpath but I wasn't able to get it tp produce a logfile. I created a new logfile from the RealVNC-viewer but like in my previous attempt, I'm not seeng any keytrokes at all in that log. Attaching it here.
RealVNCvncviewer.log

@MBD62
Copy link
Author

MBD62 commented Oct 24, 2024

The stuff in #1847 and subsequently #1852 looks interesting. If going back to the keyboard-setting used at the time of my submitting #1818 the fix for VK_PACKET may make it work. (with the German keyboard set in Azure I don't see VK_PACKET but I do with the keyboard set to Auto)

Unfortunately I don't know how to build from source-code so I'd have to wait for this to get into an update.

@MBD62
Copy link
Author

MBD62 commented Oct 24, 2024

Looking at the RealVNCvncviewer.log, two sets of entries like this may explain why that log contains no keystroke info at all:
<15> 2024-10-23T09:01:41.817Z WinVM-EU-0 vncviewer[9692]: Feature: Enable RecordInputs (failed)
<15> 2024-10-23T09:01:41.817Z WinVM-EU-0 vncviewer[9692]: Feature: Enable PlayInputs (failed)

@CendioOssman
Copy link
Member

Hi CendioOssman,
access is through a Web-browser but yes, RDP apparently does it in the background.
vncviewer.log

Thank you. Unfortunately, the log does show a buggy behaviour from the RDP client you are using. It is not sending AltGr the same way that a "real" Windows machine does.

To fix this, we would need to figure out some way to detect this broken behaviour. Nothing obvious in the log on how to do that, though. And it might not be possible.

Someone with access to such a system would need to analyse the events more deeply and see if there are any hints.

Have you reported this issue to Microsoft/Azure?

The TightVNC- and RealVNC-viewers are working OK. Does this mean that they internally translate things differently from how the TigerVNC-viewer does it or do, when they are in use, other keycodes/keysyms come out?

They likely use the crude method we also used to have. Unfortunately, that method breaks other use cases. Like pressing Ctrl and AltGr at the same time.

I failed to create a logfile with the TightVNC viewer. The executable has an option -logpath but I wasn't able to get it tp produce a logfile. I created a new logfile from the RealVNC-viewer but like in my previous attempt, I'm not seeng any keytrokes at all in that log. Attaching it here.
RealVNCvncviewer.log

Was this with debug settings, as documented here:

https://help.realvnc.com/hc/en-us/articles/360002321517-How-do-I-generate-debug-logs-in-RealVNC-Connect#realvnc-viewer-windows-macos-linux--0-3

@CendioOssman CendioOssman added the notourbug This issue needs to be resolved elsewhere label Oct 28, 2024
@MBD62
Copy link
Author

MBD62 commented Oct 28, 2024

Was this with debug settings, as documented here:

https://help.realvnc.com/hc/en-us/articles/360002321517-How-do-I-generate-debug-logs-in-RealVNC-Connect#realvnc-viewer-windows-macos-linux--0-3

No, it was with the settings described in the original link above, *:file:100.
vncviewer.log
The new log was with "Debug", still has these lines as the other one, with 'failed' where it looks like keystroke recording is not successful.

Seeing some potential in a possible fix to #1847 , I will close this issue and wait for that fix to end up in a new executable. (and just use RealVNC-viewer for now) In parallel I'll try and find some other key than the F12 to use with xmodmap to generate ISO_Level3_Shift.

I have not reported to uSoft Azure, thinking they, like IT-support, will suggest to use another viewer instead.
Thanks for looking at this.

@MBD62 MBD62 closed this as not planned Won't fix, can't repro, duplicate, stale Oct 28, 2024
@svenssonaxel
Copy link

Unfortunately I don't know how to build from source-code so I'd have to wait for this to get into an update.

Author of #1852 here. Figuring out how to build indeed took the majority of the time. I contributed an easier way to build in #1854. If you want to try that, you'd have to merge both PRs locally.

@svenssonaxel
Copy link

To fix this, we would need to figure out some way to detect this broken behaviour. Nothing obvious in the log on how to do that, though. And it might not be possible.

@MBD62 If you can download keyboa and run listenkey -dlc on both machines (where AltGr works and where it doesn't), then maybe we can figure out such a way. This program will print lots of keyboard layout information, then consume and print 30 key events. So try something similar, AltGr+\ or something and we'll see how it compares. Note that you must press and release about 15 keys before you'll be able to use your keyboard in another applicaton.

@MBD62
Copy link
Author

MBD62 commented Nov 4, 2024

To fix this, we would need to figure out some way to detect this broken behaviour. Nothing obvious in the log on how to do that, though. And it might not be possible.

@MBD62 If you can download keyboa and run listenkey -dlc on both machines (where AltGr works and where it doesn't), then maybe we can figure out such a way. This program will print lots of keyboard layout information, then consume and print 30 key events. So try something similar, AltGr+\ or something and we'll see how it compares. Note that you must press and release about 15 keys before you'll be able to use your keyboard in another applicaton.

I have attached four textfiles collected. Two using the RealVNC-viewer and two using the TigerVNC-viewer. One pair with The Azure web-interface keyboard-setting to German and the second pair with that setting to Auto.
RealVNC-viewer is OK in both settings.
TigerVNC-viewer does all but AltGR-keys with the German setting and pretty much nothing at all in the Auto setting.
RealVNCviewer__Works.txt
RealVNCviewer__WorksAutoKB.txt
TigerVNCviewer__notOK.txt
TigerVNCviewer__notOKautoKB.txt

@svenssonaxel
Copy link

Thank you. IIUC, you have collected all four files in the Azure web interface, while running listenkey -dlc and a VNC viewer concurrently.

In the German layout cases it looks like you type AltGr+OEM4, where OEM = ß. In the Auto cases it instead comes through as AltGr+VK_PACKET = \. I would guess that it's supposed to be backslash in both cases? Could you confirm whether I have understood correctly?

Based on the above, I would guess that #1852 could solve this in Auto mode. With the German setting however, we need a different workaround.

@CendioOssman Three things stands out in the Azure case:

  • "function_keys": 0, rather than "function_keys": 12,.
    According to MS docs, the number of function keys can be retrieved by GetKeyboardType(2).
    This is normally 12, rarely 24, but in the Azure case it's 0.
    Perhaps this can be used for detection?
  • Scan code 84 "Sys Req" is missing. Perhaps this is not a great way to detect it.
  • The timestamp for the keydown Ctrl and keydown Alt match exactly.
    So, one possible way to detect the broken behavior is
    • Receive Left Ctrl Down
    • Wait for up to 1ms.
    • If we receive a Left Alt Down with matching timestamp, then reinterpret as AltGr.

@svenssonaxel
Copy link

@MBD62 Here is a build with #1852. If you want to be able to inspect what you build (which is recommended), you can merge #1852 and #1854, then run nix build .#windows. I'd be interested how that works for you on Azure in Auto mode.

@MBD62
Copy link
Author

MBD62 commented Nov 5, 2024

In the German layout cases it looks like you type AltGr+OEM4, where OEM = ß. In the Auto cases it instead comes through as AltGr+VK_PACKET = \. I would guess that it's supposed to be backslash in both cases? Could you confirm whether I have understood correctly?

@svenssonaxel : Correct, I was mainly trying to type the backslash, (AltGr + ß.)

Speaking of FunctionKeys: At an earlier stage I had re-defined my F12 using xmodmap in Linux, to be used instead of AltGr, and that worked fine. (well, not for my muscle-memory so I cheated and went back to the RealVNC-viewer) Last time I tried doing that again though, it was not impressed, there I had probably just made some mistake since it had worked OK before. That would generally suggest that at least F12 does something also in the Azure web-interface. (aka SessionDesktop in Azure-lingo)

@MBD62
Copy link
Author

MBD62 commented Nov 5, 2024

@MBD62 Here is a build with #1852. If you want to be able to inspect what you build (which is recommended), you can merge #1852 and #1854, then run nix build .#windows. I'd be interested how that works for you on Azure in Auto mode.

@svenssonaxel : Thanks a lot. I tried the new executable with Azure's Auto-mode and that combo is now on par with the German KB-setting in Azure: Looks like everything works except the AltGr-stuff. (needless to say, new executable + German KB-setting in Azure still behaves the same way)

@svenssonaxel
Copy link

@MBD62 I have two solution attempts, could you please test them to see if AltGr works? Hopefully it should work in both Auto and German mode.

It would also be nice if you could get me a debug printout using this build, in both modes:

@MBD62
Copy link
Author

MBD62 commented Nov 6, 2024

@MBD62 I have two solution attempts, could you please test them to see if AltGr works? Hopefully it should work in both Auto and German mode.

* [vncviewer-1856-solution-attempt-1.exe.gz](https://github.com/user-attachments/files/17636750/vncviewer-1856-solution-attempt-1.exe.gz)

* [vncviewer-1856-solution-attempt-2.exe.gz](https://github.com/user-attachments/files/17636752/vncviewer-1856-solution-attempt-2.exe.gz)

It would also be nice if you could get me a debug printout using this build, in both modes:

* [vncviewer-1856-debugger-3.exe.gz](https://github.com/user-attachments/files/17637226/vncviewer-1856-debugger-3.exe.gz)

OK, thx.
Both *-1.exe and *-2.exe are unable to produce any characters with AltGr pressed, this is true for both the Auto- and German keyboard-settings.

*-debugger-3.exe log-files are attached. Ran with "-Log *:file:100" and renamed the files for identification.
Attempted to produce the same keystroke-sequence in both settings, 10x backslash, RETURN, five each of ö, ä and ß, then RETURN again.
debugger3AUTOvncviewer.log
debugger3GERMANvncviewer.log

@svenssonaxel
Copy link

@MBD62 Thank you, please do likewise for this one:
vncviewer-1856-debugger-4.exe.gz

@MBD62
Copy link
Author

MBD62 commented Nov 6, 2024

@svenssonaxel
Copy link

@MBD62 Attempted a fix, will also produce a log: vncviewer-1856-solution-attempt-5.exe.gz

svenssonaxel added a commit to svenssonaxel/tigervnc that referenced this issue Nov 6, 2024
@MBD62
Copy link
Author

MBD62 commented Nov 7, 2024

@MBD62 Attempted a fix, will also produce a log: vncviewer-1856-solution-attempt-5.exe.gz

@svenssonaxel thanks.
This seems complicated. Same status as before, no results from typing with AltGr pressed, two new logfiles attached.
solutionAttempt5AUTOvncviewer.log
solutionAttempt5GERMANvncviewer.log

@svenssonaxel
Copy link

@MBD62 Yeah, it might seem a little complicated because I can't debug myself. Bear with me, please, we're getting close now!
vncviewer-1856-solution-attempt-6.exe.gz

@MBD62
Copy link
Author

MBD62 commented Nov 7, 2024

@MBD62 Yeah, it might seem a little complicated because I can't debug myself. Bear with me, please, we're getting close now! vncviewer-1856-solution-attempt-6.exe.gz

@svenssonaxel Hm, you need to bear with me and not the other way around;-) You are the one doing the work, which I kindly appreciate. Either way, this looks like a breakthrough: The öäß did not materialize properly with German Azure KB-setting but they do in the Auto-setting. And yes,the backslash works with both settings, as well as the other AltGr-characters. (the attached logfiles still only have the same keystrokes as the earlier files, simply for consistency)
solutionAttempt6AUTOvncviewer.log
solutionAttempt6GERMANvncviewer.log

I'll start using this version for viewing from now on and see how it plays. I would not bother trying to fix the behavior with the German KB-setting: Having Auto working seems like a better prospect for other keyboards anyway, French or Italian, for example.
Thanks for your efforts, much appreciated:-)

@svenssonaxel
Copy link

Good to hear it partly works now. I've detected a problem releasing AltGr, perhaps that is responsible for no öäß with german setting? Try this one:
vncviewer-1856-solution-attempt-7.exe.gz

I'd also like you to try a cleaned up version, without logging. Functionality in your use case should be equivalent:
vncviewer-1856-pr-candidate-8.exe.gz

@MBD62
Copy link
Author

MBD62 commented Nov 8, 2024

@svenssonaxel
Thanks. I'm working with the cleaned-up vncviewer-1856-pr-candidate-8.exe from now on, with the Azure KB set to Auto.

The vncviewer-1856-solution-attempt-7.exe looks like it's doing the same thing as vncviewer-1856-solution-attempt-6.exe did. ( öäß incorrectly interpreted)
Logfiles attached. (including AUTO KB-setting as well, for completeness)
solutionAttempt7AUTOvncviewer.log
solutionAttempt7GERMANvncviewer.log

For me personally, getting it to work with the German KB-setting is not important at all but in case you want to fix that too, I'm of course happy to test out any further attempts.

@svenssonaxel
Copy link

@MBD62
Copy link
Author

MBD62 commented Nov 11, 2024

@MBD62 vncviewer-1856-solution-attempt-9.exe.gz

@svenssonaxel
Bingo:-) Thanks.
solutionAttempt9GERMANvncviewer.log

Logfile with German KB-setting is attached, thanks. (in retrospect, I'll test this version with keyboard set to Auto as well, for completeness, I'd update the comment or add a new one only in case of trouble with the Auto setting, while almost certain there won't be any, after a test we will know)

Comment edited: KB-setting Auto still works, as expected.

@svenssonaxel
Copy link

@MBD62 I take it german characters work now? But the log looks like backslash broke instead? Please try this one:
vncviewer-1856-solution-attempt-10.exe.gz

Please try to type the string aBcÄÖäöß\aBcÄÖäöß\ßa and confirm that all characters are typed correctly, repeat for both auto and german mode. If any of that fails, please send the logs and the string that actually showed up on the desktop on the other end.

@MBD62
Copy link
Author

MBD62 commented Nov 11, 2024

@MBD62 I take it german characters work now? But the log looks like backslash broke instead? Please try this one:
vncviewer-1856-solution-attempt-10.exe.gz

@svenssonaxel
At first I was going to say "incorrect, the backslash came out just fine" but in retrospect you may actually be right and I did not get all 10 keystrokes shown on the screen but only the first few. I'll need an hour or so for something else but will come back and test again. (strings typed were 10x backslash, 5xö, 5xä and 5xß, you may be correct that in the German setting I did not get all 10 backslashes displayed...) I'll type your suggestion and also multiple consecutive backslashes and look more closely.

Unlike previous attempts at German: I did not get any wrong characters displayed, but possible the last few did just not come out.

@MBD62
Copy link
Author

MBD62 commented Nov 11, 2024

Please try to type the string aBcÄÖäöß\aBcÄÖäöß\ßa and confirm that all characters are typed correctly, repeat for both auto and german mode. If any of that fails, please send the logs and the string that actually showed up on the desktop on the other end.

@svenssonaxel Thanks. First of all, my apologies for mistyping your string a couple of times in the Attempt10info.txt files. I hope there aren't too many errors which I did not notice. The data shown in the Attempt9info.txt should be OK. If I need to re-do the trial with the 10, let me know.

While again collecting the info with the attempt-9-executable, I think I noticed what you were saying, while typing the \ happily shows but it looks like the system does not see all, perhaps it sees every second keystroke or something.
solutionAttempt9AUTOvncviewer2.log
solutionAttempt9GERMANvncviewer2.log
solutionAttempt10AUTOvncviewer.log
solutionAttempt10GERMANvncviewer.log
Attempt9info.txt
Attempt10info.txt

@MBD62
Copy link
Author

MBD62 commented Nov 11, 2024

@svenssonaxel I tried .\vncviewer-1856-solution-attempt-7.exe again, German keyboard-setting. CAUTION: In this data ALL characters are typed 10x, not only the , also also ö, ä and :
$\\\\\
\\: Command not found.
$ ˝˝˝˝˝^^^^^\\\\\
˝˝˝˝˝^^^^^\\: Command not found.
$

Looks like all three characters are noted on only every 2nd keystroke. Not sure why I never noticed that before. The times I have been doing some editing using TigerVNC, I have not been using German, but Auto, so I'll need to try some "regular work" with the German setting, from what it looks like.
solutionAttempt7GERMANvncviewer2.log

@svenssonaxel
Copy link

From solutionAttempt10*.log it appears that backslash does work, so I wonder if the trouble can be on the server side. Could you try 10x backslash with Attempt10 and look at the result not only in a terminal app, but also in xev?

@MBD62
Copy link
Author

MBD62 commented Nov 12, 2024

@svenssonaxel What I'm seeing in a few different programs (and mainly also in the Terminal) says something different I think. I'll try and walk through this more methodically tomorrow morning, and attempt to summarize what I'm seeing. This is what it looks like to me though, all with the German keyboard-setting, not Auto:

  • attempt10 is not able to generate any characters requiring AltGr
  • AltGr with attempt10 appears to generate the same as Left-Alt does, for any cases where I do get a character coming out
  • With attempt10 LibreOffice Writer, GVIM, emacs and a built-in gnome TextEditor program all agree with the characters like üöäß etc. Only NEdit does badly with those, but that's an old X11-program, so it has another layer of possible translation-issues (which could probably be fixed using xmodmap). I haven't studied that in detail yet but at first glance it also looks like xev agrees with what the other programs are saying
  • The fact that AltGr produces Left-Alt is also confirmed by menus popping up when pressing keys that open menus when Alt is pressed (still attempt10)
  • attempt9 does well with all characters that require AltGr, perhaps with the exception of the EUR-character (on the "E" key)
  • attempt9, on the other hand, struggles with most or all German-specific characters that require no AltGr (üöäß for example)

Plse bear with me, I'll try to come up with a reasonably clean summary tomorrow morning, thanks.

@svenssonaxel
Copy link

@MBD62 Intriguing, I begin to suspect server-side issues here. From what I can tell in the logs, both german mode, both attempt 9 and 10 send german characters in the same way. Backslash however is different: In attempt 10 it's sent as XK_ISO_Level3_Shift down, XK_backslash down, XK_backslash up, XK_ISO_Level3_Shift up. This seems correct to me, but your server apparently can't handle it. On the other hand in attempt 9 it's sent as XK_ISO_Level3_Shift down, XK_ssharp down, XK_ssharp up, XK_ISO_Level3_Shift up, which should not produce backslash.

Perhaps it'd be worth comparing attempt10 with realvnc and get a server-side log from xev for both.

@MBD62
Copy link
Author

MBD62 commented Nov 12, 2024

On the other hand in attempt 9 it's sent as XK_ISO_Level3_Shift down, XK_ssharp down, XK_ssharp up, XK_ISO_Level3_Shift up, which should not produce backslash.

@svenssonaxel Regarding ISO_Level3_Shift I beg to disagree, or perhaps/probably I'm just not able to cleanly make sense of the directions up/down properly: As I used xmodmap to redefine my F12-key, ISO_Level3_Shift is what I asked for, which is what I believe any receiving program would expect AltGr to actually generate. (A current workaround is to use xmodmap -e "keycode 96 = ISO_Level3_Shift NoSymbol ISO_Level3_Shift" , for example. ) That xmodmap statement makes F12 work as a replacement for AltGr. (but my thumb keeps gravitating downwards, not upwards...)

As for comparing with RealVNC: Despite more than one attempt, I've never been able to make RealVNC to place any keystrokes at all in the log, the log from RealVNC does contain some error-messages that to the layman in me suggests that these try to tell me that no keystrokes are recorded. Again, I'm trying to re-visit this tomorrow morning, thanks.

@svenssonaxel
Copy link

@MBD62 I think we agree on ISO_Level3_Shift, so let me clarify: Both attempt 9 and 10 seem to detect AltGr correctly and send it as ISO_Level3_Shift. I think we agree this is what vncviewer should do?

However, when AltGr is held down and you press the ß key, that's supposed to generate keysym XK_backslash. Here, attempt 10 does it correctly while attempt 9 instead generates ß. I would therefore expect attempt 10 to correctly reproduce characters requiring AltGr while attempt 9 not. You report the opposite with 9 working and 10 not.

I'm not asking for a client-side log with realvnc. What I'd be interested in, is the output from xev running on the server, while you access it using realvnc vs attempt10. The reason I'm interested in this, is that at this point I think they should produce the same VNC-protocol events so if one works and another does not, I'd need to understand the difference.

I'd also be interested in the output of xmodmap -pm -pk server-side.

Take your time, no rush!

@MBD62
Copy link
Author

MBD62 commented Nov 13, 2024

I think we agree on ISO_Level3_Shift, so let me clarify: Both attempt 9 and 10 seem to detect AltGr correctly and send it as ISO_Level3_Shift. I think we agree this is what vncviewer should do?
@svenssonaxel Thanks for your patience:-) We indeed agree. Nevertheless, attempt9 produces each and every AltGr-character in the terminal. (will re-confirm other programs as well) Attempt10 does not.

I'm starting the viewer in PowerShell to ensure I'm not just clicking the wrong icon, this seems strange. A file with the xmodmap output is attached.
xmodmap_pm_pk.txt

Further trials will be done but will come in chunks as I'm unable to carve out a large enough block to try everying in a single go.
Thanks again.

@MBD62
Copy link
Author

MBD62 commented Nov 13, 2024

@svenssonaxel Some textfiles will be uploaded, hopefully the filenames make sense. Three sets of three files each were captured, two with attempt-10 and one with the RealVNC-viewer. (=REAL in the filenames)

The two sets of TigerVNC-viewer files were captured with keyboard set to Auto and to German, the RealVNC-files only with German kb-setting. Each set contains files where I (tried to;-) type the string "aBcÄÖäöß\aBcÄÖäöß\ßa"

On a side-note: Just to try something "perhaps more neutral", I proved that a Libre-Office Writer window also receives all the AltGr-characters cleanly in RealVNC and receives nothing with attempt-10.

Unless you suggest otherwise, my next step will be to repeat that exercise with attempt-9.
gnomeTextEditor10auto.txt
NEdit10auto.txt
xev10auto.txt
gnomeTextEditor10german.txt
NEdit10german.txt
xev10german.txt
gnomeTextEditor10germanREAL.txt
NEdit10germanREAL.txt
xev10germanREAL.txt
(just corrected a typo, in all files the string typed was the same)

@MBD62
Copy link
Author

MBD62 commented Nov 13, 2024

@svenssonaxel trials with attempt-9, TigerVNC-viewer with German and Auto keyboard settings.
xev09german.txt
gnomeTextEditor09german.txt
NEdit09german.txt
xev09auto.txt
gnomeTextEditor09auto.txt
NEdit09auto.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
notourbug This issue needs to be resolved elsewhere
Projects
None yet
Development

No branches or pull requests

3 participants