New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FEAT(client): Introduce GlobalShortcutButtons, for better shortcut management #4722
FEAT(client): Introduce GlobalShortcutButtons, for better shortcut management #4722
Conversation
c8e0d88
to
6f096d9
Compare
I would prefer showing the actual key combination instead of the number of buttons that it consists of. 'cause in the end the user wants to know which keys to press and not how many |
Should I show the key combination without specifying the device? For example: |
Yes that LGTM. Are there situations in which the device information could get important? |
Definitely, for example when multiple devices may have a button with the same name. However, you can just open the dialog to have detailed info. |
6f096d9
to
4e27e1f
Compare
Done. |
3 things:
In that case I think buttons from these devices should get a special prefix. Thus only regular keyboard keys should be displayed without a prefix while all other keys should get a short prefix identifying the device they are living on (similar to my suggestion for the mouse keys). Otherwise there will probably be a lot of confusion there. |
Ah yes in that case we should definitely use quotes. I think using single quotes is best for this purpose. Except for the single quote character itself. Using double quotes for that is ugly as well though. Not sure what we should do with that. I guess for the time being it would be fine to just also use single quotes around it since it is probably unlikely that someone maps this key anyways I still think we should additionally drop the
That shouldn't be the case. Do you think it would be possible to create a mapping from backend specific representations to unified representations in Mumble?
In principle that sounds good. I am not entirely sure though what exactly you have in mind with your last sentence. Could you give a quick example? |
I agree, consider that the single quote shows up as
Absolutely.
Mumble saves the raw button info in the configuration, not the button name. As such it's not possible to import/export shortcuts in different operating systems, because each backend identifies buttons its own way.
|
That wasn't even my main point. My main point was that we should not depend on the backend for naming of buttons. That can be used as a fallback but in general I would prefer having buttons named consistently across backends. The suggestion with the additional prefix fields LGTM |
Sure, no problem. |
8b5cc42
to
683d8b9
Compare
Updated. |
683d8b9
to
ccbd31c
Compare
…nagement This is a dialog that allows to efficiently view/add/remove buttons for a specific shortcut. The tree design allows to easily identify the buttons and the device they're attached to. The capture process can be started by pressing on "Add". Once all buttons are released the process stops automatically. There's only a cosmetic issue, that should be fixed in our theme: no distinction between active and focused QPushButton.
…tcut GlobalShortcut::buttonName() and GlobalShortcut::buttonText() are removed in favor of GlobalShortcut::buttonInfo(). The new function returns a ButtonInfo structure, which contains two strings: one identifies the device, the other one the button. ShortcutKeyWidget is removed, as replaced by GlobalShortcutButtons.
Scanning directory './src'... Scanning directory './src/mumble'... Updating 'src/mumble/mumble_en.ts'... Found 1937 source text(s) (15 new and 1922 already existing) Removed 4 obsolete entries
ccbd31c
to
01ed5e9
Compare
GlobalShortcutButtons
is a dialog that allows to efficiently view/add/remove buttons for a specific shortcut.The tree design allows to easily identify the buttons and the device they're attached to.
The capture process can be started by pressing on
Add
.Once all buttons are released the process stops automatically.
There's only a cosmetic issue, that should be fixed in our theme: no distinction between active and focused
QPushButton
.GlobalShortcut::buttonName()
andGlobalShortcut::buttonText()
are removed in favor ofGlobalShortcut::buttonInfo()
.The new function returns a
ButtonInfo
structure, which contains two strings: one identifies the device, the other one the button.ShortcutKeyWidget
is removed, as replaced byGlobalShortcutButtons
.