Added special hotkey config rules for comma and semicolon #916
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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_Space
is already in the special keys list and will already be substituted for"Space"
.