[GH-ISSUE #1223] Super + : (shift + ;) is treated as Super + ; in the client #987

Open
opened 2026-05-05 07:21:23 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @tom-tan on GitHub (Jul 4, 2021).
Original GitHub issue: https://github.com/debauchee/barrier/issues/1223

Describe the bug
As described in the title.
Barrier client successfully receives Super+: virtual keys but it is decoded to Super + ; keys (See Additional context section for details).

To Reproduce
I used Windows server and macOS client.

  1. Input Win + : in the client screen

Expected behavior
A keystroke Command + : is sent to the client.
For example, if there exists a keyboard short cut for Command + :, it is invoked.

Actual behavior
A keystroke Command + ; is sent to the client.
A keyboard short cut for Command + ; is invoked rather than a short cut for Command + :.

Desktop (please complete the following information):

Server:

  • OS: Windows 10
  • Barrier version: 2.3.3

Client:

  • OS: macOS Big Sur (intel mac)
  • Barrier version: 2.3.3

Additional context
I confirmed the single colon (:) is successfully treated as is in the client as follows.
In this case, a virtual key code 0x3a (:) is decoded to the key stroke 0x38 + 0x29 (i.e., shift + ;).

[2021-07-04T15:42:42] DEBUG1: recv key down id=0x0000003a, mask=0x0000, button=0x0028
[2021-07-04T15:42:42] DEBUG1: mapKey 003a (58) with mask 0000, start state: 0000
[2021-07-04T15:42:42] DEBUG1: find best:  0000 0000
[2021-07-04T15:42:42] DEBUG1: best key index 1 of 1 (1 modifiers)
[2021-07-04T15:42:42] DEBUG1: found key in group 3
[2021-07-04T15:42:42] DEBUG1: state: 0000,0001,0005
[2021-07-04T15:42:42] DEBUG1: flip: 0001 (0000 vs 0001 in 0005 - 0000)
[2021-07-04T15:42:42] DEBUG1: desired state: 0000 0001,0001,0005
[2021-07-04T15:42:42] DEBUG1: flip: 0000 (0001 vs 0000 in fffa - 6020)
[2021-07-04T15:42:42] DEBUG1: mapped to 02a, new state 0000
[2021-07-04T15:42:42] DEBUG1: keystrokes:
[2021-07-04T15:42:42] DEBUG1:   button=0x0039 virtualKey=0x0038 keyDown=down
[2021-07-04T15:42:42] DEBUG1:   button=0x002a virtualKey=0x0029 keyDown=down
[2021-07-04T15:42:42] DEBUG1:   button=0x0039 virtualKey=0x0038 keyDown=up
[2021-07-04T15:42:42] DEBUG1: recv key up id=0x0000003a, mask=0x0000, button=0x0028
[2021-07-04T15:42:42] DEBUG1: keystrokes:
[2021-07-04T15:42:42] DEBUG1:   button=0x002a virtualKey=0x0029 keyDown=up

Note:

  • 0x0000003a is a virtual key code for : that is defined in src/lib/barrier/key_types.cpp
  • 0x0038 and 0x0029 are key codes for kVK_Shift and kVK_ANSI_Semicolon, respectively.

On the other hand, here is a debug log in the case of Win + :.
A virtual key code : is decoded to the key stroke 0x29 and it lacks 0x38.

[2021-06-28T11:33:04] DEBUG1: recv key down id=0x0000003a, mask=0x0010, button=0x0028
[2021-06-28T11:33:04] DEBUG1: mapKey 003a (58) with mask 0010, start state: 0010
[2021-06-28T11:33:04] INFO: found key in group 3
[2021-06-28T11:33:04] DEBUG1: state: 0010,0001,0000
[2021-06-28T11:33:04] DEBUG1: flip: 0000 (0010 vs 0001 in 0000 - 0000)
[2021-06-28T11:33:04] DEBUG1: desired state: 0010 0010,0001,0005
[2021-06-28T11:33:04] DEBUG1: flip: 0000 (0010 vs 0010 in ffff - 6020)
[2021-06-28T11:33:04] DEBUG1: mapped to 02a, new state 0010
[2021-06-28T11:33:04] DEBUG1: keystrokes:
[2021-06-28T11:33:04] DEBUG1:   button=0x002a virtualKey=0x0029 keyDown=down
[2021-06-28T11:33:04] DEBUG1: recv key up id=0x0000003a, mask=0x0010, button=0x0028
[2021-06-28T11:33:04] DEBUG1: keystrokes:
[2021-06-28T11:33:04] DEBUG1:   button=0x002a virtualKey=0x0029 keyDown=up

Note:

  • the key mask 0x0010 is a key modifier Super (a.k.a. Win or Command key)
Originally created by @tom-tan on GitHub (Jul 4, 2021). Original GitHub issue: https://github.com/debauchee/barrier/issues/1223 **Describe the bug** As described in the title. Barrier client successfully receives Super+`:` virtual keys but it is decoded to Super + `;` keys (See Additional context section for details). **To Reproduce** I used Windows server and macOS client. 1. Input `Win + :` in the client screen **Expected behavior** A keystroke `Command + :` is sent to the client. For example, if there exists a keyboard short cut for `Command + :`, it is invoked. **Actual behavior** A keystroke `Command + ;` is sent to the client. A keyboard short cut for `Command + ;` is invoked rather than a short cut for `Command + :`. **Desktop (please complete the following information):** Server: - OS: Windows 10 - Barrier version: 2.3.3 Client: - OS: macOS Big Sur (intel mac) - Barrier version: 2.3.3 **Additional context** I confirmed the single colon (`:`) is successfully treated as is in the client as follows. In this case, a virtual key code `0x3a` (`:`) is decoded to the key stroke `0x38` + `0x29` (i.e., shift + `;`). ``` [2021-07-04T15:42:42] DEBUG1: recv key down id=0x0000003a, mask=0x0000, button=0x0028 [2021-07-04T15:42:42] DEBUG1: mapKey 003a (58) with mask 0000, start state: 0000 [2021-07-04T15:42:42] DEBUG1: find best: 0000 0000 [2021-07-04T15:42:42] DEBUG1: best key index 1 of 1 (1 modifiers) [2021-07-04T15:42:42] DEBUG1: found key in group 3 [2021-07-04T15:42:42] DEBUG1: state: 0000,0001,0005 [2021-07-04T15:42:42] DEBUG1: flip: 0001 (0000 vs 0001 in 0005 - 0000) [2021-07-04T15:42:42] DEBUG1: desired state: 0000 0001,0001,0005 [2021-07-04T15:42:42] DEBUG1: flip: 0000 (0001 vs 0000 in fffa - 6020) [2021-07-04T15:42:42] DEBUG1: mapped to 02a, new state 0000 [2021-07-04T15:42:42] DEBUG1: keystrokes: [2021-07-04T15:42:42] DEBUG1: button=0x0039 virtualKey=0x0038 keyDown=down [2021-07-04T15:42:42] DEBUG1: button=0x002a virtualKey=0x0029 keyDown=down [2021-07-04T15:42:42] DEBUG1: button=0x0039 virtualKey=0x0038 keyDown=up [2021-07-04T15:42:42] DEBUG1: recv key up id=0x0000003a, mask=0x0000, button=0x0028 [2021-07-04T15:42:42] DEBUG1: keystrokes: [2021-07-04T15:42:42] DEBUG1: button=0x002a virtualKey=0x0029 keyDown=up ``` Note: - `0x0000003a` is a virtual key code for `:` that is defined in [`src/lib/barrier/key_types.cpp`](https://github.com/debauchee/barrier/blob/6a1bcb9dd62771bcb004596e63989edd1483c62d/src/lib/barrier/key_types.cpp#L180) - `0x0038` and `0x0029` are key codes for `kVK_Shift` and `kVK_ANSI_Semicolon`, respectively. On the other hand, here is a debug log in the case of `Win + :`. A virtual key code `:` is decoded to the key stroke `0x29` and it lacks `0x38`. ``` [2021-06-28T11:33:04] DEBUG1: recv key down id=0x0000003a, mask=0x0010, button=0x0028 [2021-06-28T11:33:04] DEBUG1: mapKey 003a (58) with mask 0010, start state: 0010 [2021-06-28T11:33:04] INFO: found key in group 3 [2021-06-28T11:33:04] DEBUG1: state: 0010,0001,0000 [2021-06-28T11:33:04] DEBUG1: flip: 0000 (0010 vs 0001 in 0000 - 0000) [2021-06-28T11:33:04] DEBUG1: desired state: 0010 0010,0001,0005 [2021-06-28T11:33:04] DEBUG1: flip: 0000 (0010 vs 0010 in ffff - 6020) [2021-06-28T11:33:04] DEBUG1: mapped to 02a, new state 0010 [2021-06-28T11:33:04] DEBUG1: keystrokes: [2021-06-28T11:33:04] DEBUG1: button=0x002a virtualKey=0x0029 keyDown=down [2021-06-28T11:33:04] DEBUG1: recv key up id=0x0000003a, mask=0x0010, button=0x0028 [2021-06-28T11:33:04] DEBUG1: keystrokes: [2021-06-28T11:33:04] DEBUG1: button=0x002a virtualKey=0x0029 keyDown=up ``` Note: - the key mask `0x0010` is a key modifier `Super` (a.k.a. `Win` or `Command` key)
Author
Owner

@PhilCS commented on GitHub (Nov 5, 2021):

The problem comes from here. It seems... intentional?

69ec896e65/src/lib/barrier/KeyMap.cpp (L538-L551)

<!-- gh-comment-id:962160716 --> @PhilCS commented on GitHub (Nov 5, 2021): The problem comes from here. It seems... intentional? https://github.com/debauchee/barrier/blob/69ec896e656de1bb3f02f3fe2d9fb50c6efa8edc/src/lib/barrier/KeyMap.cpp#L538-L551
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#987
No description provided.