On Thu Oct 6 11:55:45 2022 +0000, Timo Zuccarello wrote:
I just went through the email thread (I'm still new to navigating pipermail/mailing list archives) and I see the point, although I don't think I can entirely grasp what VNC does. But the way I understand it is that even if we used XKB names for the scan codes as in this MR, those would be messed up just as well when using a VNC X server, as it maps backwards from vkeys to scan codes? In the XKB specification/documentation, "The key name links keys with similar functions or in similar positions on keyboards that report different scan codes", which gets me wondering how Windows actually handles exotic keyboards or rather what is common practice in the drivers for said exotic keyboards. In any case, I agree, I suppose optional layout detection would be the most compatible solution for now at least.
@rbernon Prompted by someone who also had issues with exotic or non-qwerty keyboard layouts in #winehq, I've taken another look at this. Came across a StackOverflow post about detecting whether a display is VNC (https://stackoverflow.com/questions/29371717/linux-detecting-if-youre-runnin...). Would that be an option? I.e. add an override winecfg option and by default try to detect a VNC session and if it's VNC, use previous mapping/code, otherwise use XKB?