[GH-ISSUE #512] Barrier doesn't find modifier keys #397

Open
opened 2026-05-05 06:17:28 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @PocketSquirrl on GitHub (Nov 25, 2019).
Original GitHub issue: https://github.com/debauchee/barrier/issues/512

Operating Systems

Server: Windows 10 1903 / Ubuntu

Client: Ubuntu 16.04.6 / Windows
(I tried both setups with windows or linux as a server)

Barrier Version

2.2.3
(Windows Installer / Ubuntu build from source)

Steps to reproduce bug

  1. Set Keyboard Layout to Neo2 (included with Ubuntu, has to be installed manually in Windows)
  2. Install and configure Barrier (i only set up screen section and add mousebuttons)
  3. Writing without modifiers works fine and shift is also working
    But when using mod4: > or alt ctrl-key
    or even mod5(shift+mod3) or mod6(mod3+mod4) I only get a few keys.
    [mod3: caps-lock-key or #]

Other info

linux-server:
[2019-11-25T13:54:29] DEBUG1: send enter to "Laptop", 1919,844 15 0000
[2019-11-25T13:54:30] DEBUG1: new mask: 0x0000
[2019-11-25T13:54:30] DEBUG1: event: KeyPress code=94, state=0x0000
[2019-11-25T13:54:30] DEBUG1: onKeyDown id=65041 mask=0x0000 button=0x005e
[2019-11-25T13:54:30] DEBUG1: send key down to "Laptop" id=65041, mask=0x0000, button=0x005e
[2019-11-25T13:54:30] DEBUG1: new mask: 0x0040
[2019-11-25T13:54:30] DEBUG1: event: KeyPress code=65, state=0x0020
[2019-11-25T13:54:30] DEBUG1: onKeyDown id=61360 mask=0x0040 button=0x0041
[2019-11-25T13:54:30] DEBUG1: send key down to "Laptop" id=61360, mask=0x0040, button=0x0041
[2019-11-25T13:54:30] DEBUG1: new mask: 0x0040
[2019-11-25T13:54:30] DEBUG1: event: KeyRelease code=65, state=0x0020
[2019-11-25T13:54:30] DEBUG1: onKeyUp id=61360 mask=0x0040 button=0x0041
[2019-11-25T13:54:30] DEBUG1: send key up to "Laptop" id=61360, mask=0x0040, button=0x0041
[2019-11-25T13:54:30] DEBUG1: new mask: 0x0040o
[2019-11-25T13:54:30] DEBUG1: event: KeyRelease code=94, state=0x0020
[2019-11-25T13:54:30] DEBUG1: onKeyUp id=65041 mask=0x0040 button=0x005e
[2019-11-25T13:54:30] DEBUG1: send key up to "Laptop" id=65041, mask=0x0040, button=0x005e
[2019-11-25T13:54:31] DEBUG1: try to leave "Laptop" on right

windows-client:
[2019-11-25T13:55:45] DEBUG1: mapKey fe11 (65041) with mask 0000, start state: 2000
[2019-11-25T13:55:45] DEBUG1: key fe11 is not on keyboard
[2019-11-25T13:55:45] DEBUG1: recv key down id=0x0000efb0, mask=0x0040, button=0x0041
[2019-11-25T13:55:45] DEBUG1: mapKey efb0 (61360) with mask 0040, start state: 2000
[2019-11-25T13:55:45] DEBUG1: find best: 2000 0040
[2019-11-25T13:55:45] DEBUG1: best key index 1 of 1 (1 modifiers)
[2019-11-25T13:55:45] DEBUG1: found key in group 1
[2019-11-25T13:55:45] DEBUG1: state: 2000,2000,2001
[2019-11-25T13:55:45] DEBUG1: flip: 0000 (2000 vs 2000 in 2001 - 0000)
[2019-11-25T13:55:45] DEBUG1: desired state: 0040 2000,2000,2001
[2019-11-25T13:55:45] DEBUG1: flip: 0040 (2000 vs 0040 in dffe - 6020)
[2019-11-25T13:55:45] DEBUG1: no key for modifier 0040
[2019-11-25T13:55:45] DEBUG1: unable to match desired modifier state (0040,dffe) for key 82
[2019-11-25T13:55:45] DEBUG1: can't map key

windows-server:
[2019-11-25T13:59:17] DEBUG1: send enter to "linux", 0,308 3 2000
[2019-11-25T13:59:19] DEBUG1: hook: 0x000000df 0x00560001
[2019-11-25T13:59:19] DEBUG1: hook: 0x060000df 0x00560001
[2019-11-25T13:59:19] DEBUG1: hook: 0x070000df 0x00560001
[2019-11-25T13:59:19] DEBUG1: event: Key char=0, vk=0xdf, nagr=0, lParam=0x00560001
[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000
[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000
[2019-11-25T13:59:19] DEBUG1: cannot map key
[2019-11-25T13:59:19] DEBUG1: hook: 0x00000020 0x00390001
[2019-11-25T13:59:19] DEBUG1: hook: 0x06013020 0x00390001
[2019-11-25T13:59:19] DEBUG1: hook: 0x07003020 0x00390001
[2019-11-25T13:59:19] DEBUG1: event: Key char=48, vk=0x20, nagr=0, lParam=0x00390001
[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000
[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000
[2019-11-25T13:59:19] DEBUG1: onKeyDown id=48 mask=0x2000 button=0x0039
[2019-11-25T13:59:19] DEBUG1: send key down to "linux" id=48, mask=0x2000, button=0x0039
[2019-11-25T13:59:19] DEBUG1: hook: 0x00000020 0x80390001
[2019-11-25T13:59:19] DEBUG1: hook: 0x06013020 0x80390001
[2019-11-25T13:59:19] DEBUG1: hook: 0x07003020 0x80390001
[2019-11-25T13:59:19] DEBUG1: event: Key char=48, vk=0x20, nagr=0, lParam=0x80390001
[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000
[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000
[2019-11-25T13:59:19] DEBUG1: onKeyUp id=48 mask=0x2000 button=0x0039
[2019-11-25T13:59:19] DEBUG1: send key up to "linux" id=48, mask=0x2000, button=0x0039
[2019-11-25T13:59:20] DEBUG1: hook: 0x000000df 0x80560001
[2019-11-25T13:59:20] DEBUG1: hook: 0x060000df 0x80560001
[2019-11-25T13:59:20] DEBUG1: hook: 0x070000df 0x80560001
[2019-11-25T13:59:20] DEBUG1: event: Key char=0, vk=0xdf, nagr=0, lParam=0x80560001
[2019-11-25T13:59:20] DEBUG1: new mask: 0x2000
[2019-11-25T13:59:20] DEBUG1: new mask: 0x2000
[2019-11-25T13:59:20] DEBUG1: cannot map key
[2019-11-25T13:59:23] DEBUG1: try to leave "linux" on left

linux-client:
[2019-11-25T14:00:02] DEBUG1: recv key down id=0x00000030, mask=0x2000, button=0x0039
[2019-11-25T14:00:02] DEBUG1: mapKey 0030 (48) with mask 2000, start state: 0000
[2019-11-25T14:00:02] DEBUG1: find best: 0000 2000
[2019-11-25T14:00:02] DEBUG1: best key index 1 of 1 (exact)
[2019-11-25T14:00:02] DEBUG1: found key in group 0
[2019-11-25T14:00:02] DEBUG1: state: 0000,0000,0061
[2019-11-25T14:00:02] DEBUG1: flip: 0000 (0000 vs 0000 in 0061 - 0000)
[2019-11-25T14:00:02] DEBUG1: desired state: 2000 0000,0000,0061
[2019-11-25T14:00:02] DEBUG1: flip: 0000 (0000 vs 2000 in ff9e - 6020)
[2019-11-25T14:00:02] DEBUG1: mapped to 013, new state 0000
[2019-11-25T14:00:02] DEBUG1: keystrokes:
[2019-11-25T14:00:02] DEBUG1: 013 (00000000) down
[2019-11-25T14:00:02] DEBUG1: recv key up id=0x00000030, mask=0x2000, button=0x0039
[2019-11-25T14:00:02] DEBUG1: keystrokes:
[2019-11-25T14:00:02] DEBUG1: 013 (00000000) up

I used for both tests the mod4+space.
With the linux-server I wasn't able to get the correct character "0".
Instead there was no output.

With the windows-server I did get the character.
If I use a key which is not working, it looks the same, but the linux-client doesn't even recieve any keycodes. So there is no log for this case.

Originally created by @PocketSquirrl on GitHub (Nov 25, 2019). Original GitHub issue: https://github.com/debauchee/barrier/issues/512 ### Operating Systems ### Server: Windows 10 1903 / Ubuntu Client: Ubuntu 16.04.6 / Windows (I tried both setups with windows or linux as a server) ### Barrier Version ### 2.2.3 (Windows Installer / Ubuntu build from source) ### Steps to reproduce bug ### 1. Set Keyboard Layout to Neo2 (included with Ubuntu, has to be installed manually in Windows) 2. Install and configure Barrier (i only set up screen section and add mousebuttons) 3. Writing without modifiers works fine and shift is also working But when using mod4: > or alt ctrl-key or even mod5(shift+mod3) or mod6(mod3+mod4) I only get a few keys. [mod3: caps-lock-key or #] ### Other info ### linux-server: `[2019-11-25T13:54:29] DEBUG1: send enter to "Laptop", 1919,844 15 0000` `[2019-11-25T13:54:30] DEBUG1: new mask: 0x0000` `[2019-11-25T13:54:30] DEBUG1: event: KeyPress code=94, state=0x0000` `[2019-11-25T13:54:30] DEBUG1: onKeyDown id=65041 mask=0x0000 button=0x005e` `[2019-11-25T13:54:30] DEBUG1: send key down to "Laptop" id=65041, mask=0x0000, button=0x005e` `[2019-11-25T13:54:30] DEBUG1: new mask: 0x0040` `[2019-11-25T13:54:30] DEBUG1: event: KeyPress code=65, state=0x0020` `[2019-11-25T13:54:30] DEBUG1: onKeyDown id=61360 mask=0x0040 button=0x0041` `[2019-11-25T13:54:30] DEBUG1: send key down to "Laptop" id=61360, mask=0x0040, button=0x0041` `[2019-11-25T13:54:30] DEBUG1: new mask: 0x0040` `[2019-11-25T13:54:30] DEBUG1: event: KeyRelease code=65, state=0x0020` `[2019-11-25T13:54:30] DEBUG1: onKeyUp id=61360 mask=0x0040 button=0x0041` `[2019-11-25T13:54:30] DEBUG1: send key up to "Laptop" id=61360, mask=0x0040, button=0x0041` `[2019-11-25T13:54:30] DEBUG1: new mask: 0x0040o` `[2019-11-25T13:54:30] DEBUG1: event: KeyRelease code=94, state=0x0020` `[2019-11-25T13:54:30] DEBUG1: onKeyUp id=65041 mask=0x0040 button=0x005e` `[2019-11-25T13:54:30] DEBUG1: send key up to "Laptop" id=65041, mask=0x0040, button=0x005e` `[2019-11-25T13:54:31] DEBUG1: try to leave "Laptop" on right` windows-client: `[2019-11-25T13:55:45] DEBUG1: mapKey fe11 (65041) with mask 0000, start state: 2000` `[2019-11-25T13:55:45] DEBUG1: key fe11 is not on keyboard` `[2019-11-25T13:55:45] DEBUG1: recv key down id=0x0000efb0, mask=0x0040, button=0x0041` `[2019-11-25T13:55:45] DEBUG1: mapKey efb0 (61360) with mask 0040, start state: 2000` `[2019-11-25T13:55:45] DEBUG1: find best: 2000 0040` `[2019-11-25T13:55:45] DEBUG1: best key index 1 of 1 (1 modifiers)` `[2019-11-25T13:55:45] DEBUG1: found key in group 1` `[2019-11-25T13:55:45] DEBUG1: state: 2000,2000,2001` `[2019-11-25T13:55:45] DEBUG1: flip: 0000 (2000 vs 2000 in 2001 - 0000)` `[2019-11-25T13:55:45] DEBUG1: desired state: 0040 2000,2000,2001` `[2019-11-25T13:55:45] DEBUG1: flip: 0040 (2000 vs 0040 in dffe - 6020)` `[2019-11-25T13:55:45] DEBUG1: no key for modifier 0040` `[2019-11-25T13:55:45] DEBUG1: unable to match desired modifier state (0040,dffe) for key 82` `[2019-11-25T13:55:45] DEBUG1: can't map key` windows-server: `[2019-11-25T13:59:17] DEBUG1: send enter to "linux", 0,308 3 2000` `[2019-11-25T13:59:19] DEBUG1: hook: 0x000000df 0x00560001` `[2019-11-25T13:59:19] DEBUG1: hook: 0x060000df 0x00560001` `[2019-11-25T13:59:19] DEBUG1: hook: 0x070000df 0x00560001` `[2019-11-25T13:59:19] DEBUG1: event: Key char=0, vk=0xdf, nagr=0, lParam=0x00560001` `[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000` `[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000` `[2019-11-25T13:59:19] DEBUG1: cannot map key` `[2019-11-25T13:59:19] DEBUG1: hook: 0x00000020 0x00390001` `[2019-11-25T13:59:19] DEBUG1: hook: 0x06013020 0x00390001` `[2019-11-25T13:59:19] DEBUG1: hook: 0x07003020 0x00390001` `[2019-11-25T13:59:19] DEBUG1: event: Key char=48, vk=0x20, nagr=0, lParam=0x00390001` `[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000` `[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000` `[2019-11-25T13:59:19] DEBUG1: onKeyDown id=48 mask=0x2000 button=0x0039` `[2019-11-25T13:59:19] DEBUG1: send key down to "linux" id=48, mask=0x2000, button=0x0039` `[2019-11-25T13:59:19] DEBUG1: hook: 0x00000020 0x80390001` `[2019-11-25T13:59:19] DEBUG1: hook: 0x06013020 0x80390001` `[2019-11-25T13:59:19] DEBUG1: hook: 0x07003020 0x80390001` `[2019-11-25T13:59:19] DEBUG1: event: Key char=48, vk=0x20, nagr=0, lParam=0x80390001` `[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000` `[2019-11-25T13:59:19] DEBUG1: new mask: 0x2000` `[2019-11-25T13:59:19] DEBUG1: onKeyUp id=48 mask=0x2000 button=0x0039` `[2019-11-25T13:59:19] DEBUG1: send key up to "linux" id=48, mask=0x2000, button=0x0039` `[2019-11-25T13:59:20] DEBUG1: hook: 0x000000df 0x80560001` `[2019-11-25T13:59:20] DEBUG1: hook: 0x060000df 0x80560001` `[2019-11-25T13:59:20] DEBUG1: hook: 0x070000df 0x80560001` `[2019-11-25T13:59:20] DEBUG1: event: Key char=0, vk=0xdf, nagr=0, lParam=0x80560001` `[2019-11-25T13:59:20] DEBUG1: new mask: 0x2000` `[2019-11-25T13:59:20] DEBUG1: new mask: 0x2000` `[2019-11-25T13:59:20] DEBUG1: cannot map key` `[2019-11-25T13:59:23] DEBUG1: try to leave "linux" on left` linux-client: `[2019-11-25T14:00:02] DEBUG1: recv key down id=0x00000030, mask=0x2000, button=0x0039` `[2019-11-25T14:00:02] DEBUG1: mapKey 0030 (48) with mask 2000, start state: 0000` `[2019-11-25T14:00:02] DEBUG1: find best: 0000 2000` `[2019-11-25T14:00:02] DEBUG1: best key index 1 of 1 (exact)` `[2019-11-25T14:00:02] DEBUG1: found key in group 0` `[2019-11-25T14:00:02] DEBUG1: state: 0000,0000,0061` `[2019-11-25T14:00:02] DEBUG1: flip: 0000 (0000 vs 0000 in 0061 - 0000)` `[2019-11-25T14:00:02] DEBUG1: desired state: 2000 0000,0000,0061` `[2019-11-25T14:00:02] DEBUG1: flip: 0000 (0000 vs 2000 in ff9e - 6020)` `[2019-11-25T14:00:02] DEBUG1: mapped to 013, new state 0000` `[2019-11-25T14:00:02] DEBUG1: keystrokes:` `[2019-11-25T14:00:02] DEBUG1: 013 (00000000) down` `[2019-11-25T14:00:02] DEBUG1: recv key up id=0x00000030, mask=0x2000, button=0x0039` `[2019-11-25T14:00:02] DEBUG1: keystrokes:` `[2019-11-25T14:00:02] DEBUG1: 013 (00000000) up` I used for both tests the mod4+space. With the linux-server I wasn't able to get the correct character "0". Instead there was no output. With the windows-server I did get the character. If I use a key which is not working, it looks the same, but the linux-client doesn't even recieve any keycodes. So there is no log for this case.
gitea-mirror added the
bug
windows
linux
labels 2026-05-05 06:17:28 -06:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 1, 2020):

Is this issue still an issue for you? Please do comment and let us know! Alternatively, you may close the issue yourself if it is no longer an problem

<!-- gh-comment-id:701709393 --> @github-actions[bot] commented on GitHub (Oct 1, 2020): Is this issue still an issue for you? Please do comment and let us know! Alternatively, you may close the issue yourself if it is no longer an problem
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#397
No description provided.