[PR #916] [MERGED] Added special hotkey config rules for comma and semicolon #1719

Closed
opened 2026-05-05 08:00:18 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/debauchee/barrier/pull/916
Author: @dustinlieu
Created: 10/17/2020
Status: Merged
Merged: 1/10/2021
Merged by: @p12tic

Base: masterHead: fix/hotkey-special-chars


📝 Commits (1)

  • a48f183 gui: Added special hotkey config rules for comma and semicolon

📊 Changes

3 files changed (+14 additions, -13 deletions)

View changed files

📝 src/gui/src/KeySequence.cpp (+11 -10)
📝 src/gui/test/HotkeyTests.cpp (+1 -1)
📝 src/gui/test/KeySequenceTests.cpp (+2 -2)

📄 Description

The config parser interprets commas and semicolons as syntax. This PR adds commas and semicolons to the special keys list so that ',' becomes "Comma" and ';' becomes "Semicolon". This allows hotkeys to contain commas and semicolons.

Fixes issue #778

Edited for additional comments on changes on line 215:
I had to reorder how KeySequence::keyToString() decides how to serialize a key so that it will prioritize checking the special keys list before checking for 7-bit printable characters. This made excluding a space character (key != Qt::Key_Space) from the 7-bit printable character check (if (key < 0x80 && key != Qt::Key_Space)) redundant because Qt::Key_Space is already in the special keys list and will already be substituted for "Space".


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/debauchee/barrier/pull/916 **Author:** [@dustinlieu](https://github.com/dustinlieu) **Created:** 10/17/2020 **Status:** ✅ Merged **Merged:** 1/10/2021 **Merged by:** [@p12tic](https://github.com/p12tic) **Base:** `master` ← **Head:** `fix/hotkey-special-chars` --- ### 📝 Commits (1) - [`a48f183`](https://github.com/debauchee/barrier/commit/a48f183ee14cb042f594c5710f7c9e33a76dbeb1) gui: Added special hotkey config rules for comma and semicolon ### 📊 Changes **3 files changed** (+14 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `src/gui/src/KeySequence.cpp` (+11 -10) 📝 `src/gui/test/HotkeyTests.cpp` (+1 -1) 📝 `src/gui/test/KeySequenceTests.cpp` (+2 -2) </details> ### 📄 Description The config parser interprets commas and semicolons as syntax. This PR adds commas and semicolons to the special keys list so that ',' becomes "Comma" and ';' becomes "Semicolon". This allows hotkeys to contain commas and semicolons. Fixes issue #778 **Edited for additional comments on changes on [line 215](https://github.com/debauchee/barrier/pull/916/files#diff-b3f12433f5e2de847168c791983976886341f69b1b1ffc763ee378b60fc4363aL215):** I had to reorder how `KeySequence::keyToString()` decides how to serialize a key so that it will prioritize checking the special keys list before checking for 7-bit printable characters. This made excluding a space character (`key != Qt::Key_Space`) from the 7-bit printable character check (`if (key < 0x80 && key != Qt::Key_Space)`) redundant because `Qt::Key_Space` is already in the special keys list and will already be substituted for `"Space"`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror 2026-05-05 08:00:18 -06:00
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#1719
No description provided.