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

Tilde and grave don't work on linux client with macOS server #1531

Open
plars opened this issue Jan 21, 2022 · 18 comments · May be fixed by #1711
Open

Tilde and grave don't work on linux client with macOS server #1531

plars opened this issue Jan 21, 2022 · 18 comments · May be fixed by #1711

Comments

@plars
Copy link

plars commented Jan 21, 2022

What happened?

I'm running a setup with macOS 12.1 running barrier 2.4 and Ubuntu Desktop 20.04(its) running barrier 2.4. Things seem to mostly work ok except for tilde (~) and grave (`) don't make it to the client running Linux. They show up fine on the server (macOS) but not on Linux, so the keyboard itself seems to be ok.
I've tried different keyboard layout combinations on both the server and the client (plain US, US international, etc) and no combination of them seems to resolve this.

I also enabled Debug1 logging on the client and found these messages when pressing first the grave then tilde. Log attached.

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

server: .dmg file from GitHub
client: snap

What OSes are you seeing the problem on? (Check all that apply)

Linux, macOS

What OS versions are you using?

Server: MacOS 12.1
Client: Ubuntu 20.04

Relevant log output

[2022-01-21T10:21:39] DEBUG1: recv key down id=0x0000ef2a, mask=0x0000, button=0x0033
[2022-01-21T10:21:39] DEBUG1: mapKey ef2a (61226) with mask 0000, start state: 2000
[2022-01-21T10:21:39] DEBUG1: key ef2a is not on keyboard
[2022-01-21T10:21:39] DEBUG1: recv key up id=0x00000000, mask=0x0000, button=0x0033
[2022-01-21T10:21:40] DEBUG1: recv key down id=0x0000efe1, mask=0x0001, button=0x0039
[2022-01-21T10:21:40] DEBUG1: mapKey efe1 (61409) with mask 0001, start state: 2000
[2022-01-21T10:21:40] DEBUG1: find best:  2000 0001
[2022-01-21T10:21:40] DEBUG1: best key index 1 of 1 (exact)
[2022-01-21T10:21:40] DEBUG1: found key in group 1
[2022-01-21T10:21:40] DEBUG1: state: 2000,0000,0000
[2022-01-21T10:21:40] DEBUG1: flip: 0000 (2000 vs 0000 in 0000 - 0000)
[2022-01-21T10:21:40] DEBUG1: desired state: 0001 2000,0000,0000
[2022-01-21T10:21:40] DEBUG1: flip: 0000 (2000 vs 0001 in fffe - 6020)
[2022-01-21T10:21:40] DEBUG1: mapped to 032, new state 2001
[2022-01-21T10:21:40] DEBUG1: keystrokes:
[2022-01-21T10:21:40] DEBUG1:   032 (00000000) down
[2022-01-21T10:21:41] DEBUG1: recv key down id=0x0000ef2a, mask=0x0001, button=0x0033
[2022-01-21T10:21:41] DEBUG1: mapKey ef2a (61226) with mask 0001, start state: 2001
[2022-01-21T10:21:41] DEBUG1: key ef2a is not on keyboard
[2022-01-21T10:21:41] DEBUG1: recv key up id=0x00000000, mask=0x0001, button=0x0033
[2022-01-21T10:21:41] DEBUG1: recv key up id=0x0000efe1, mask=0x0000, button=0x0039
[2022-01-21T10:21:41] DEBUG1: new state 2000
[2022-01-21T10:21:41] DEBUG1: keystrokes:
[2022-01-21T10:21:41] DEBUG1:   032 (00000000) up

Any other information

No response

@Entr04y
Copy link

Entr04y commented Jan 25, 2022

I'm also seeing this issue running the server on Big Sur and connecting to another Mac running Big Sur. Server is running version 2.4.0-release-3e0d758b, build date nov. 11, 2021. Client is currently Version 2.3.3-release-3395cca9, build date july 14, 2020. Barrier was installed on both machines via homebrew.

Also reported as issue #1407

workaround alt codes:

alt+126 : ~
alt+96 : `

@vladimirlagunov
Copy link

It starts working properly when I comment the selected line.

{ kKeyZenkaku, kVK_ANSI_Grave }

vladimirlagunov added a commit to vladimirlagunov/barrier that referenced this issue Jan 26, 2022
…zenkaku

It was introduced in the pull request debauchee#1214, and even in the description of the request it had been acknowledged that there is no such key on mac keyboards.

As a consequence, it led to inability to transfer grave and tilde symbols, at least from macOS to Windows on default "ABC" keyboard layout.

Unfortunately, I don't have a JIS keyboard, nor understand how to use it. The only thing I can suggest now is to revert the controversial remapping.
vladimirlagunov added a commit to vladimirlagunov/barrier that referenced this issue Jan 26, 2022
…zenkaku

It was introduced in the pull request debauchee#1214, and even in the description of the request it had been acknowledged that there is no such key on mac keyboards.

As a consequence, it led to inability to transfer the grave accent and and the tilde, at least from macOS to Windows on default "ABC" keyboard layout.

Unfortunately, I don't have a JIS keyboard, nor understand how to use it. The only thing I can suggest now is to revert the controversial remapping.
vladimirlagunov added a commit to vladimirlagunov/barrier that referenced this issue Jan 26, 2022
…zenkaku

The bug was introduced in the pull request debauchee#1214, and even in the description of the request it had been acknowledged that there is no such key on mac keyboards.

As a consequence, it led to inability to transfer the grave accent and and the tilde, at least from macOS to Windows on default "ABC" keyboard layout.

Unfortunately, I don't have a JIS keyboard, nor understand how to use it. The only thing I can suggest now is to revert the controversial remapping.
@AdamMomen
Copy link

@plars are you running it on Mac m1?

@plars
Copy link
Author

plars commented Jan 28, 2022

Yes, this is on a m1 mac mini

@Entr04y
Copy link

Entr04y commented Jan 28, 2022

In my case both the server and client are 2017 intel macbook pros.

@SamuelMereau
Copy link

Seeing this issue too with macOS as the server, macOS Monterey 12.1 (Intel Macbook Air) --> Windows 11 Pro 21H2

@ignacimo98
Copy link

Seeing this issue as well with macOS Big Sur on Intel -> Windows 10

@eoleumbi
Copy link

It starts working properly when I comment the selected line.

{ kKeyZenkaku, kVK_ANSI_Grave }

Barrier 2.4.0 with this patch fixes the issue with tilde and grave.
Tested: Linux client with macOS Barrier server (2017 intel MacBook / macOS Monterey).

Thanks! @vladimirlagunov

@dgentry
Copy link

dgentry commented Jul 6, 2022

Either @vladimirlagunov's PR #1541 or my newer #1711 will fix this. I "released" a binary for m1 Macs running Monterey, downloadable from my fork in the meantime. You'll probably have to codesign it yourself (see the link).

@jaredl7
Copy link

jaredl7 commented Oct 16, 2022

An alternative fix is to create a hotkey for tilde and backtick (grave) as recommended by this comment: #1160 (comment). I had the same issue using a Linux client connecting to a Barrier server running on Monterey. Using hotkeys to send the tilde and backtick keystrokes works flawlessly.

@lorrin
Copy link

lorrin commented Oct 21, 2022

I tried using the hotkey work-around. It worked for sending tidle and backtick to other machines, but made it no longer possible to type those characters on the server. :-(

@Joshfindit
Copy link

Joshfindit commented Nov 28, 2022

I write markdown all the time, so backtick is an important key for both server and client.

Intel macOS 12.3 -> Windows

Looking forward to a fix being in the official release!

@rhstanton
Copy link

Following up on on the solution proposed by @vladimirlagunov above, I recompiled the code and the fix MOSTLY works (OSX server, Ubuntu client). When I first move to the client, both the quote and tilde work fine. But if I move the mouse back to the server and then back to the client, only the tilde shows, regardless of whether I press shift or not. Thanks!

@jmatsushita
Copy link

Please note there is a MacOS build with @dgentry's fix available as an Azure pipeline published artifact.

@mricos
Copy link

mricos commented May 27, 2024

With Mac running 2.4.0 in server mode I configured my setup with the GUI server config and then saved the config to ~/.config/barrier/barrier.conf

I then added this at the bottom

section: options
keystroke(Shift+grave) = keystroke(tilde)
keystroke(grave) = keystroke(grave)
end

and it works as expected.

@forrestjgq
Copy link

With Mac running 2.4.0 in server mode I configured my setup with the GUI server config and then saved the config to ~/.config/barrier/barrier.conf

I then added this at the bottom

section: options keystroke(Shift+grave) = keystroke(tilde) keystroke(grave) = keystroke(grave) end

and it works as expected.

You are my hero!

@forrestjgq
Copy link

||\

With Mac running 2.4.0 in server mode I configured my setup with the GUI server config and then saved the config to ~/.config/barrier/barrier.conf
I then added this at the bottom
section: options keystroke(Shift+grave) = keystroke(tilde) keystroke(grave) = keystroke(grave) end
and it works as expected.

You are my hero!

@mricos In this way you can not type tilde on macos, so it could not be accepted

@erickmiller
Copy link

is there still no official solution to this problem?

the hotkeys setup makes the keys no longer work on the mac server! they work on the linux client but then stop working on the mac server... this is a deal breaker. i'm writing code all day long between my mac machine and my linux machine, and this problem literally makes barrier completely un-usable -- it is impossible to code all day long and not be able to type ~ or ` on one of the machines.

also, as an aside, the mac command-key (aka the super/meta key on gnome) has issues when its remapped as the ctrl key using gnome tweaks or any other method, the key remapping is not obeyed on the linux client machine (it works on the regular keyboard plugged into the linux machine but not on the keyboard coming from the mac client).

i've tried everything, literally wasted an entire day trying to solve this problem. i'm hesitant to waste even more time trying to build this fork but am probably going to try that next... an official fix planned for this problem any time soon?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.