[GH-ISSUE #1898] Linux, bepo layout : altgr+space sends a | instead of a _ on client #1384

Open
opened 2026-05-05 07:47:27 -06:00 by gitea-mirror · 0 comments
Owner

Originally created by @MonsieurLanza on GitHub (Feb 13, 2023).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1898

What happened?

On client, whenever I type a _ I get a |.

I may have a unusual configuration, but altgr+space sends the right keycode on my keyboard.
Anyway I use a home assembled ergodox with a QMK firmware and "fr bepo_afnor" layout on both machines, and fcitx5 as input method on both machines. (along with dwm as a window manager, if that does matter).

Yeah, I know, this is kinda weird setup and somewhat uncommon configuration, but still, barrier should send correct altGr + space keycode anyway.

Version

v2.4.0

Git commit hash (if applicable)

No response

If applicable, where did you install Barrier from?

Archlinux community repository, as in sudo pacman -S barrier.

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

Linux

What OS versions are you using?

Up to date archlinux on both client and server.

Relevant log output

Using xev server side, press AltGR, press Space, release Space, then release AltGR:

KeyPress event, serial 32, synthetic NO, window 0x3000001,
    root 0x1de, subw 0x0, time 2640014, (1472,1283), root:(1478,1289),
    state 0x10, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x3000001,
    root 0x1de, subw 0x0, time 2640665, (1472,1283), root:(1478,1289),
    state 0x90, keycode 65 (keysym 0x5f, underscore), same_screen YES,
    XLookupString gives 1 bytes: (5f) "_"
    XmbLookupString gives 1 bytes: (5f) "_"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x3000001,
    root 0x1de, subw 0x0, time 2640665, (1472,1283), root:(1478,1289),
    state 0x90, keycode 65 (keysym 0x5f, underscore), same_screen YES,
    XLookupString gives 1 bytes: (5f) "_"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x3000001,
    root 0x1de, subw 0x0, time 2641816, (1472,1283), root:(1478,1289),
    state 0x90, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XKeysymToKeycode returns keycode: 92
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

Client side, same sequence :

KeyPress event, serial 29, synthetic NO, window 0x4000001,
    root 0x522, subw 0x0, time 3972209, (638,1187), root:(644,1193),
    state 0x10, keycode 92 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 32, synthetic NO, window 0x4000001,
    root 0x522, subw 0x0, time 3973929, (638,1187), root:(644,1193),
    state 0x90, keycode 24 (keysym 0x7c, bar), same_screen YES,
    XLookupString gives 1 bytes: (7c) "|"
    XmbLookupString gives 1 bytes: (7c) "|"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x4000001,
    root 0x522, subw 0x0, time 3973929, (638,1187), root:(644,1193),
    state 0x90, keycode 24 (keysym 0x7c, bar), same_screen YES,
    XLookupString gives 1 bytes: (7c) "|"
    XFilterEvent returns: False

KeyRelease event, serial 32, synthetic NO, window 0x4000001,
    root 0x522, subw 0x0, time 3975648, (638,1187), root:(644,1193),
    state 0x90, keycode 92 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

With Debug1 on client

[2023-02-13T12:16:39] DEBUG1: state: 2000,0000,0000
[2023-02-13T12:16:39] DEBUG1: flip: 0000 (2000 vs 0000 in 0000 - 0000)
[2023-02-13T12:16:39] DEBUG1: desired state: 2000 2000,0000,0000
[2023-02-13T12:16:39] DEBUG1: flip: 0000 (2000 vs 2000 in ffdf - 6020)
[2023-02-13T12:16:39] DEBUG1: mapped to 05c, new state 2020
[2023-02-13T12:16:39] DEBUG1: keystrokes:
[2023-02-13T12:16:39] DEBUG1:   05c (00000000) down
[2023-02-13T12:16:40] DEBUG1: recv key down id=0x0000005f, mask=0x2020, button=0x0041
[2023-02-13T12:16:40] DEBUG1: mapKey 005f (95) with mask 2020, start state: 2020
[2023-02-13T12:16:40] INFO: found key in group 0
[2023-02-13T12:16:40] DEBUG1: state: 2020,0021,0000
[2023-02-13T12:16:40] DEBUG1: flip: 0000 (2020 vs 0021 in 0000 - 0000)
[2023-02-13T12:16:40] DEBUG1: desired state: 2020 2020,0021,1021
[2023-02-13T12:16:40] DEBUG1: flip: 0000 (2020 vs 2020 in ffff - 6020)
[2023-02-13T12:16:40] DEBUG1: mapped to 018, new state 2020
[2023-02-13T12:16:40] DEBUG1: keystrokes:
[2023-02-13T12:16:40] DEBUG1:   018 (00000000) down
[2023-02-13T12:16:40] DEBUG1: recv key up id=0x0000005f, mask=0x2020, button=0x0041
[2023-02-13T12:16:40] DEBUG1: keystrokes:
[2023-02-13T12:16:40] DEBUG1:   018 (00000000) up
[2023-02-13T12:16:41] DEBUG1: recv key up id=0x0000ef7e, mask=0x2020, button=0x006c
[2023-02-13T12:16:41] DEBUG1: new state 2000
[2023-02-13T12:16:41] DEBUG1: keystrokes:
[2023-02-13T12:16:41] DEBUG1:   05c (00000000) up

On server

[2023-02-13T12:24:37] DEBUG1: new mask: 0x2000
[2023-02-13T12:24:37] DEBUG1: event: KeyPress code=108, state=0x0010
[2023-02-13T12:24:37] DEBUG1: onKeyDown id=61310 mask=0x2000 button=0x006c
[2023-02-13T12:24:37] DEBUG1: send key down to "client" id=61310, mask=0x2000, button=0x006c
[2023-02-13T12:24:43] DEBUG1: new mask: 0x2020
[2023-02-13T12:24:43] DEBUG1: event: KeyPress code=65, state=0x0090
[2023-02-13T12:24:43] DEBUG1: onKeyDown id=95 mask=0x2020 button=0x0041
[2023-02-13T12:24:43] DEBUG1: send key down to "client" id=95, mask=0x2020, button=0x0041
[2023-02-13T12:24:43] DEBUG1: new mask: 0x2020
[2023-02-13T12:24:43] DEBUG1: event: KeyRelease code=65, state=0x0090
[2023-02-13T12:24:43] DEBUG1: onKeyUp id=95 mask=0x2020 button=0x0041
[2023-02-13T12:24:43] DEBUG1: send key up to "client" id=95, mask=0x2020, button=0x0041
[2023-02-13T12:24:45] DEBUG1: new mask: 0x2020
[2023-02-13T12:24:45] DEBUG1: event: KeyRelease code=108, state=0x0090
[2023-02-13T12:24:45] DEBUG1: onKeyUp id=61310 mask=0x2020 button=0x006c
[2023-02-13T12:24:45] DEBUG1: send key up to "client" id=61310, mask=0x2020, button=0x006c

Any other information

I tried to use Gnome on both the client and server (xorg, Ibus, no fcitx), and got the same behavior.

Originally created by @MonsieurLanza on GitHub (Feb 13, 2023). Original GitHub issue: https://github.com/debauchee/barrier/issues/1898 ### What happened? On client, whenever I type a _ I get a |. I may have a unusual configuration, but `altgr`+`space` sends the right keycode on my keyboard. Anyway I use a home assembled ergodox with a QMK firmware and "fr bepo_afnor" layout on both machines, and fcitx5 as input method on both machines. (along with `dwm` as a window manager, if that does matter). Yeah, I know, this is kinda weird setup and somewhat uncommon configuration, but still, barrier should send correct `altGr + space keycode` anyway. ### Version v2.4.0 ### Git commit hash (if applicable) _No response_ ### If applicable, where did you install Barrier from? Archlinux community repository, as in `sudo pacman -S barrier`. ### What OSes are you seeing the problem on? (Check all that apply) Linux ### What OS versions are you using? Up to date archlinux on both client and server. ### Relevant log output Using `xev` server side, press `AltGR`, press `Space`, release `Space`, then release `AltGR`: ```shell KeyPress event, serial 32, synthetic NO, window 0x3000001, root 0x1de, subw 0x0, time 2640014, (1472,1283), root:(1478,1289), state 0x10, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 32, synthetic NO, window 0x3000001, root 0x1de, subw 0x0, time 2640665, (1472,1283), root:(1478,1289), state 0x90, keycode 65 (keysym 0x5f, underscore), same_screen YES, XLookupString gives 1 bytes: (5f) "_" XmbLookupString gives 1 bytes: (5f) "_" XFilterEvent returns: False KeyRelease event, serial 32, synthetic NO, window 0x3000001, root 0x1de, subw 0x0, time 2640665, (1472,1283), root:(1478,1289), state 0x90, keycode 65 (keysym 0x5f, underscore), same_screen YES, XLookupString gives 1 bytes: (5f) "_" XFilterEvent returns: False KeyRelease event, serial 32, synthetic NO, window 0x3000001, root 0x1de, subw 0x0, time 2641816, (1472,1283), root:(1478,1289), state 0x90, keycode 108 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XKeysymToKeycode returns keycode: 92 XLookupString gives 0 bytes: XFilterEvent returns: False ``` Client side, same sequence : ```shell KeyPress event, serial 29, synthetic NO, window 0x4000001, root 0x522, subw 0x0, time 3972209, (638,1187), root:(644,1193), state 0x10, keycode 92 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XLookupString gives 0 bytes: XmbLookupString gives 0 bytes: XFilterEvent returns: False KeyPress event, serial 32, synthetic NO, window 0x4000001, root 0x522, subw 0x0, time 3973929, (638,1187), root:(644,1193), state 0x90, keycode 24 (keysym 0x7c, bar), same_screen YES, XLookupString gives 1 bytes: (7c) "|" XmbLookupString gives 1 bytes: (7c) "|" XFilterEvent returns: False KeyRelease event, serial 32, synthetic NO, window 0x4000001, root 0x522, subw 0x0, time 3973929, (638,1187), root:(644,1193), state 0x90, keycode 24 (keysym 0x7c, bar), same_screen YES, XLookupString gives 1 bytes: (7c) "|" XFilterEvent returns: False KeyRelease event, serial 32, synthetic NO, window 0x4000001, root 0x522, subw 0x0, time 3975648, (638,1187), root:(644,1193), state 0x90, keycode 92 (keysym 0xfe03, ISO_Level3_Shift), same_screen YES, XLookupString gives 0 bytes: XFilterEvent returns: False ``` With `Debug1` on client ```shell [2023-02-13T12:16:39] DEBUG1: state: 2000,0000,0000 [2023-02-13T12:16:39] DEBUG1: flip: 0000 (2000 vs 0000 in 0000 - 0000) [2023-02-13T12:16:39] DEBUG1: desired state: 2000 2000,0000,0000 [2023-02-13T12:16:39] DEBUG1: flip: 0000 (2000 vs 2000 in ffdf - 6020) [2023-02-13T12:16:39] DEBUG1: mapped to 05c, new state 2020 [2023-02-13T12:16:39] DEBUG1: keystrokes: [2023-02-13T12:16:39] DEBUG1: 05c (00000000) down [2023-02-13T12:16:40] DEBUG1: recv key down id=0x0000005f, mask=0x2020, button=0x0041 [2023-02-13T12:16:40] DEBUG1: mapKey 005f (95) with mask 2020, start state: 2020 [2023-02-13T12:16:40] INFO: found key in group 0 [2023-02-13T12:16:40] DEBUG1: state: 2020,0021,0000 [2023-02-13T12:16:40] DEBUG1: flip: 0000 (2020 vs 0021 in 0000 - 0000) [2023-02-13T12:16:40] DEBUG1: desired state: 2020 2020,0021,1021 [2023-02-13T12:16:40] DEBUG1: flip: 0000 (2020 vs 2020 in ffff - 6020) [2023-02-13T12:16:40] DEBUG1: mapped to 018, new state 2020 [2023-02-13T12:16:40] DEBUG1: keystrokes: [2023-02-13T12:16:40] DEBUG1: 018 (00000000) down [2023-02-13T12:16:40] DEBUG1: recv key up id=0x0000005f, mask=0x2020, button=0x0041 [2023-02-13T12:16:40] DEBUG1: keystrokes: [2023-02-13T12:16:40] DEBUG1: 018 (00000000) up [2023-02-13T12:16:41] DEBUG1: recv key up id=0x0000ef7e, mask=0x2020, button=0x006c [2023-02-13T12:16:41] DEBUG1: new state 2000 [2023-02-13T12:16:41] DEBUG1: keystrokes: [2023-02-13T12:16:41] DEBUG1: 05c (00000000) up ``` On server ```shell [2023-02-13T12:24:37] DEBUG1: new mask: 0x2000 [2023-02-13T12:24:37] DEBUG1: event: KeyPress code=108, state=0x0010 [2023-02-13T12:24:37] DEBUG1: onKeyDown id=61310 mask=0x2000 button=0x006c [2023-02-13T12:24:37] DEBUG1: send key down to "client" id=61310, mask=0x2000, button=0x006c [2023-02-13T12:24:43] DEBUG1: new mask: 0x2020 [2023-02-13T12:24:43] DEBUG1: event: KeyPress code=65, state=0x0090 [2023-02-13T12:24:43] DEBUG1: onKeyDown id=95 mask=0x2020 button=0x0041 [2023-02-13T12:24:43] DEBUG1: send key down to "client" id=95, mask=0x2020, button=0x0041 [2023-02-13T12:24:43] DEBUG1: new mask: 0x2020 [2023-02-13T12:24:43] DEBUG1: event: KeyRelease code=65, state=0x0090 [2023-02-13T12:24:43] DEBUG1: onKeyUp id=95 mask=0x2020 button=0x0041 [2023-02-13T12:24:43] DEBUG1: send key up to "client" id=95, mask=0x2020, button=0x0041 [2023-02-13T12:24:45] DEBUG1: new mask: 0x2020 [2023-02-13T12:24:45] DEBUG1: event: KeyRelease code=108, state=0x0090 [2023-02-13T12:24:45] DEBUG1: onKeyUp id=61310 mask=0x2020 button=0x006c [2023-02-13T12:24:45] DEBUG1: send key up to "client" id=61310, mask=0x2020, button=0x006c ``` ### Any other information I tried to use Gnome on both the client and server (xorg, Ibus, no fcitx), and got the same behavior.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/barrier#1384
No description provided.