mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[GH-ISSUE #134] Wrong keyboard layout between Server and Client #107
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#107
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 @enricodetoma on GitHub (Sep 22, 2018).
Original GitHub issue: https://github.com/debauchee/barrier/issues/134
Operating Systems
Server: Windows 10
Client: Arch Linux
Barrier Version
2.1.0
Steps to reproduce bug
Other info
@abrasive commented on GitHub (Oct 16, 2018):
I think this happens because the XTEST extension is used to deliver the keystrokes, and it has its own virtual keyboard. You can see this if you run
xinput list:This can be fixed using
setxkbmap -device NwhereNis the device number from this list.I have solved this issue for now by putting the following in my
.xinitrc:This sets it to layout us, variant colemak. You can work out the correct values for your system, along with any
-optionsettings, by issuingsetxkbmap -query.@enricodetoma commented on GitHub (Oct 17, 2018):
Really curious: if I use your method with
uslayout, i.e. withI get correct
itlayout (except for accented letters, but it is not a problem).If I set
itlayout, it is completely wrong.Anyway thank you very much for this workaround!
@enricodetoma commented on GitHub (Oct 17, 2018):
Now it works with
ittoo, after a reboot...@ARodriguezMX commented on GitHub (Feb 29, 2020):
that is awesome!, a couple of years ago I looking for this solution with no luck. Thanks a lot!
@rebroad commented on GitHub (Feb 20, 2021):
I don't think this issue should be closed just because some people have found workarounds - this really needs to be something addressed by barrier in a way that most users will be able to configure it - which I would not say applies to the proposed solutions above.
@bplessis commented on GitHub (Mar 15, 2021):
Sadly this hack doesn't work on my issue (french keyboard on linux server & windows client, everything is fine up until i try some AltGr symbols, then the windows switch from FR to "Other Language" and things go awry).
Anyway just wanted to point out that while grep and sed are usefull tool, they are also often not the best ones, xinput is able to select the device to list and natively support reporting only the device id with "--id":
xinput list --id-only "Virtual core XTEST keyboard"so it then give:
@p12tic commented on GitHub (Jun 25, 2021):
Agreed, reopening the issue.
@vanarok commented on GitHub (Jul 11, 2021):
I have two devices with Manjaro installed. The configured keyboard configuration in /etc/X11/xorg. conf. d / 00-keyboard. conf does not apply on the client (two layout languages) for the virtual device described here. I get around this by running the command in the terminal after the barrier client and server connection is established:
setxkbmap -layout us,ru@mclang commented on GitHub (Sep 10, 2021):
I had this same issue between my two Linux boxes
Server: Manjaro
Client: EndeavourOS
Barrier: v2.3.3-1 (community repo)
Information gathered using
xev:AltGrproduced108 ISO_Level3_Shift, and e.gAltGr+5gave€.AltGrproduced92 ISO_Level3_Shiftand e.g key combinationAltGr+qproducedq, notäas it was supposed to.For the longest time I tried all the things suggested in the various Windows client issues, but finally the working fix was to run:
and restart the client.
Now
AltGrstill gives92 ISO_Level3_Shifton the client side. butAltGr+qandAltGr+5work as they are supposed to.Maybe this can be fixed in some point, but thanks for the workaround 👍
@stefmanf commented on GitHub (Sep 11, 2021):
Thanks a lot, I had the same problem:
Server: Ubuntu 20.04 on iMac mid 2011
Client: Raspberry pi 4
Barrier: 2.3.3
Keboard layout: Italian (Winkeys)
Now it works fine on the Raspberry.
@mclang commented on GitHub (Sep 13, 2021):
I tested some more with my Linux server/client setup.
It seems that the keyboard layout Barrier client uses is right from the start:
but key combinations like
AltGr+qstill don't work until setting same layout again manually:I hope this helps to figure out the issue.
@lombad commented on GitHub (Sep 8, 2022):
Manjaro (Server) and Arch Linux (Client) with German (nodeadkeys) layout
Barrier Version: 2.4.0
1) Configuration
I configured both (Server) and (Client) with the same layout for the
Virtual core XTEST keyboard.2) Restart
🥳 Keystrokes with
äöüßwork like a charm.@mclang commented on GitHub (Sep 9, 2022):
Also after client/server computer reboot?
@sergiomb2 commented on GitHub (May 9, 2023):
setxkbmap -devicexinput list | grep "Virtual core XTEST keyboard" | sed -e 's/.+=[0-9]\+.+/\1/'-layout "de" -variant "nodeadkeys"xinput list | grep "Virtual core XTEST keyboard"-> Virtual core XTEST keyboard id=5 [slave keyboard (3)]
setxkbmap -device 5 -layout "pt" -variant "nodeadkeys"fixed my AltGr 7 , 8 , 9 and 0
Thank you
@georgehank commented on GitHub (Jul 20, 2023):
Workaround exists… and worked until now. I now have a very crazy keyboard layout. It doesn't even produce an event for all keys. The main keys (letters, digits) are fine (except for being US). But anything else is screwed. I dicked around with setting up barrier as autostart app, but it also get started from the session info, which might or might not be a factor.
Either way, this needs a real fix.
@leighss commented on GitHub (Sep 2, 2023):
I had same issue on my RPi 3 Raspbery Pi OS Client with my ArchLabs Lenovo Thinkpad T16 Server
T16 Keyboard is Portuguese
On RPi I had it set to Generic 105 PC, Portuguese, Portuguese via the keyboard preferences on the RPI and some keys were wrong
However when I selected Generic 105 PC (int), Portuguese, Portuguese it all worked!
@sergiomb2 commented on GitHub (Sep 3, 2023):
Hi,
I'm sorry , I think I mixed up things , I was looking for keyboard problems under x11vnc and tigervnc and novnc and I ended up comment here because set "nodeadkeys" on my PT-pt keyboard, solve AltGr 7 , 8 , 9 and 0 problem , I used https://symless.com/synergy but now I use more x2vnc https://github.com/sergiomb2/x2vnc/blob/master/start_x2vnc.txt .
So I did a comment here , and later I saw that set "nodeadkeys" is not a fix, it disable composed keys and is probably a bug in x11vnc. Because only with x11vnc + tigervnc, Altgr doesn't work , if I use just tigervnc and novnc works correctly .
The curiosity is set nodeadkeys at least in my layout keyboard makes some AltGr keys works but have the downgrade of disable composed keys .
I wonder if barrier source code is based on some of these software x11vnc, libvnc (http://libvnc.github.io/ ) , novnc , tigervnc ?
Best regards
@sergiomb2 commented on GitHub (Sep 7, 2023):
BTW , (I hope that is an useful information ) https://github.com/LibVNC/x11vnc/issues/115#issuecomment-1709929660
Running x11vnc with -nomodtweak fix issue for me, on my PT-pt keyboard, AltGr 7, 8, 9 and 0 problems
@aplstroedel commented on GitHub (Apr 13, 2024):
For those who are still looking for a solution to map the right layout on boot, use ~/.xprofile with the following content: