I searched in multiple places (included this feature request area) for a way to change keyboard shortcuts.
I know in the old version of Rosegarden, you could quickly and easily change a huge variety of keyboard shortcuts.
And I loved how your could filter keyboard shortcuts, by searching for their names.
But the new version of Rosegarden does not seem to have ANY menu for changing keyboard shortcuts.
Therefore, my primary feature request is a simple way to change the keyboard shortcuts in Rosegarden.
My secondary feature request, is to re-implement the ability to filter shortcuts by name, that tool was great!
Ah right thanks.
I think if I simplify the warning dialog as described in 9 above (just accept and cancel for everything) this bug should disappear !
As to the multiple shortcuts - If we do 2 shortcuts we can do 4.
I would like to keep the number of shortcuts at 4.
Btw - My "Media Play" and "Media Record" keys work well.
Good to hear. I figured they probably work fine for somebody. Just not me.
I have simplified the ShortcutWarnDialog - only OK and cancel now.
As I suspected that also fixes the bug Ted found !
I have now addressed all the points above except for the one about alternative keyboard layouts.
Suggestion:
1. In the shortcut dialog have a button/combobox for "Apply changes for Keyboard layout"
2. Define xml files which determine the changes for a keyboard type
3. If the button is pressed make the changes - these would be user defined shortcuts.
I have a german keyboard so I can try to implement that. For other keyboards other users must help out.
Working great for me. One more rather esoteric bug. "Reset to Defaults" can introduce a conflict. In this case, the conflict dialog comes up, but doesn't seem to work. Pressing Ok sets the new shortcut, but doesn't remove the conflicting one. Cancel works fine. No changes are made.
Test case is on the wiki:
https://www.rosegardenmusic.com/wiki/test:shortcut_editor#conflictsreset_to_defaults_introduces_conflict
OK fixed the above bug.
Also in the latest version is a method for presetting shortcuts for a german keyboard.
Thanks to Ted for his great testing !!!!
I added the french keyboard based on the translation files.
This is a swap of the A and Q keys and a swap of the W and Q keys.
Note - Ctrl+Shift+Z is not translated to Ctrl+Shift+W Although the reverse mapping is included.
This leads to clash between "redo" and "Re flat" !
Maybe the Ctrl+Shift+W should not be mapped to Ctrl+Shift +Z ???
I believe the "extract shortcuts" section in extract_menu_tr_strings.pl puts the shortcuts in the translation files - Should I go ahead and remove this section of the script ?
See latest merge request.
Working really well. Thanks. Pushed latest as [911ffd]. Please test latest git.
I did not test the French keyboard support. Hopefully @yguillemot has time to try this out.
Related
Commit: [911ffd]
Two more suggestions:
Don't allow "Warnings when: Never". Always provide warnings within a context at the very least. In fact, reduce this to a checkbox: "Warn about conflicts across contexts". Default to unchecked meaning "warn in same context". This should prevent users from ever creating conflicts.
Rename "Reset to Defaults" to "Reset Selected" and add a tooltip: "Reset selected action's shortcuts to defaults". Introduce a new "Reset All" that will pop up a message box: "This will reset all shortcuts for all actions across all contexts. Are you sure?" Yes/No. If they say Yes, remove all user shortcuts. Trigger the usual "restart rg" notification on "Ok".
For the first point - not sure about this. There are some double defined shortcuts.
Open the shortcut editor
Filter on "switch to". Scroll down a bit - there are two actions with shortcut "Y": "Switch to Notes" and "Switch to Rests".
Not a problem in use because only one of these actions is enabled.
Select one of them and press "Remove shortcuts".
Now try and reset to default !!!!
I think the "warn never" setting can be useful.
On the second point - I have done as you suggest. I have also implemented multi-select so several actions can be selected and actions performed on them.
I ran the test cases - seems OK
Please test and merge!
Thanks Philip.
I can now regain the previous AZER layout without having to manually recreate all the shortcuts.
Nevertheless, it looks like a one shot feature without any simple way to come back to the initial state.
First (small) problem: why an "Apply keyboard layout" button?
Selecting the keyboard type in the combo box should be sufficient.
I make following tests with a modified notation.rc (see attachment) to easily disambiguate the note names in the shortcut editor.
Specifically:
"I/do low" --> Z
"I/do high" --> Q
Some user defined shortcuts appear.
Specifically:
"I/do low" --> W
"I/do high" --> A
The previously defined shortcuts are always here, but the keyboard layout combo box shows "None". It should show "French".
Old shortcuts are kept, and second shortcuts are sometimes created.
Specifically:
"I/do low" --> W --> Y (Y alone was expected)
"I/do high" --> A (Q was expected)
Nothing happens.
From the shortcuts editor, the only way to come back to the initial state is to select each modified shortcut and press "Reset to Defaults". (The other way being to delete Rosegarden.conf, but it seams a bit drastic).
Currently, three layouts are defined, but does a simple (user accessible) way to create other layouts exist?
Your analysis is quite correct. The "Apply keyboard layout" button makes a one shot definition of the keyboard shortcuts defined in the xml file.
I realize this is not quite ideal. Still thinking about it......
The only way to create layouts at the moment is by editing the xml file - data/locale/keyboard_shortcuts.xml.
Is this acceptable? A keyboard layout editor would be a lot of effort for something which will not be used much. If users make requests we can extend the xml file.
I didn't read the source, so I didn't find keyboard_shortcuts.xml while testing.
This file is easy to read and totally acceptable from an user point of view.
I copied it in .local/share/rosegarden/locale then modified it to add another keyboard layout and it perfectly works.
Maybe it would worth to have it automatically unbundled at start up.
I have changed things to what I think you were hoping for Yves.
Note - the keyboard translations are no longer user shortcuts ( they are applied separately).
Also unbundled the xml file.
Opinions welcome!
See latest merge request.
Thanks Philip.
I tried your last release and the shortcuts editor interface is now almost perfect.
But currently the shortcuts modified via the keyboard layout combo box don't work here.
Whatever the keyboard is "None" or "French", I can't see any difference when entering notes.
I didn't try "German".
Latest is working great for me.
One minor issue... There is an empty line between the instructions at the top and the row of buttons. (I think this is
m_clabel
,m_alabel
,m_ilabel
.) That used to fill in with the selected shortcut information. It no longer does this. Not sure it is really needed, honestly. I think you can get rid of those widgets and get a little bit of extra space. The user can see what they've selected in the list. And multi-selection means you can't really put anything up there anyway for fear of confusing the users.Hi Yves. Yes there was a problem after restarting Rosegarden the keyboard setting was not being correctly set.
Try again with the latest commit.
Ted - those labels weren't working correctly. I fixed them so the display was correct (they would be blank on multi-select). Then I deleted them anyway ;)
I just tried it again and it works great now.
The "k" indicator in the "user defined" column is very handy.
A label is probably lacking to show what the keyboard combo box is for.
Merged latest as [6dda58]. I tweaked the instruction text and added a little spacing around the buttons. Please test latest git.
Related
Commit: [6dda58]
Fixed a spelling mistake and added a label as Yves suggested.
Please merge again.
Latest pushed as [e0b11c]. Please test latest git.
One suggestion... Make the keyboard field label "Keyboard map:" (is that good? I'm not too clear on what this is doing as I've not used it. Maybe just "Keyboard:"?), then put additional explanation in the tooltip for both the label and the dropdown. E.g. "Apply changes using the selected keyboard mapping." or whatever makes sense here. This is what we do throughout rg when we need a small label for a complicated concept.
Related
Commit: [e0b11c]
I have made the changes you suggested Ted. I often forget about tooltips but they are really useful for the user !!
I made the tooltip text "Apply changes for your keyboard layout."
I feel this feature is pretty much settled now. Thanks for all the suggestions from Ted and Yves !
Oh - one thing still - Should I remove the shortcuts portion of scripts/extract_menu_tr_strings.pl and add something to get the names out of the keyboard_shortcuts.xml file ?
Thinking to it, I wonder if the names "None", "German" and "French" should not be replaced with "QWERTY", "QWERTZ" and "AZERTY" as the keyboard layout is not always related to a given language.
I remember that, some years ago, I had trouble translating the "M" key of the QWERTY keyboard to the "?/," key of the AZERTY keyboard. So I kept the "M" untranslated, which is not really correct for entering music as the "low VII" note is placed at the end of the "mid" notes row.
I presume I tried to translate "Ctrl+Shift+M" with "Ctrl+?" which didn't work. But "Ctrl+Shift+," should have worked.
Currently "Ctrl+Shift+," works in keyboard_shortcuts.xml. So it would be fine, Philip, if you could add the following two lines at the end of the AZERTY (French) keyboard shortcuts definition:
OK I added the two lines.
I updated the names as:
English (qwerty)
German (qwertz)
French (azerty)
:)
Ah - complications !!
1. Just been looking at the translation code - easy enough to remove the shortcuts. But then there are those shortcuts included in the tooltips !!
Suggestion: If we have a tooltip like "Eighth Rest (8)" we remove the " (8)" and always append the shortcuts to the tooltip (as in the automatic tooltips. The comment about shortcuts in tooltips in the ts files would have to be modified.
Oh! cut and paste again
1. tooltips amd shortcuts
2. Manual shortcuts