mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-15 14:16:02 -06:00
[PR #916] [MERGED] Added special hotkey config rules for comma and semicolon #1719
Labels
No labels
HiDPI
bounty
bsd/freebsd
bsd/openbsd
bug
bug
build-infra
cantfix
critical
doc
duplicate
enhancement
fix-available
from git
from release
good first issue
help wanted
installer/package
invalid
linux
macOS
meta
needs testing
pull-request
query
question
regression
regression
v2.4.0
windows
wontfix
work-in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/barrier#1719
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 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:
master← Head:fix/hotkey-special-chars📝 Commits (1)
a48f183gui: 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 becauseQt::Key_Spaceis 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.