Menu

#412 Change Keyboard Shortcuts (with GUI)

None
closed
4
2022-06-14
2010-04-13
Anonymous
No

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!

Related

Feature Requests: #452
Feature Requests: #473

Discussion

<< < 1 2 3 4 > >> (Page 3 of 4)
  • Philip Leishman

    Philip Leishman - 2022-03-14

    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.

     
  • Ted Felix

    Ted Felix - 2022-03-15

    Btw - My "Media Play" and "Media Record" keys work well.

    Good to hear. I figured they probably work fine for somebody. Just not me.

     
  • Philip Leishman

    Philip Leishman - 2022-03-15

    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.

     
  • Ted Felix

    Ted Felix - 2022-03-16

    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

     
  • Philip Leishman

    Philip Leishman - 2022-03-16

    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 !!!!

     
  • Philip Leishman

    Philip Leishman - 2022-03-22

    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.

     
  • Ted Felix

    Ted Felix - 2022-03-24

    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]

  • Ted Felix

    Ted Felix - 2022-03-24

    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".

     
  • Philip Leishman

    Philip Leishman - 2022-03-24

    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!

     
  • Yves Guillemot

    Yves Guillemot - 2022-03-25

    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.

    • rm Rosegarden.conf
    • Open the shortcuts editor
    • Look at current shortcuts
      Specifically:
      "I/do low" --> Z
      "I/do high" --> Q
    • Select "French" and press "Apply keyboard layout"
      Some user defined shortcuts appear.
      Specifically:
      "I/do low" --> W
      "I/do high" --> A
    • Press OK button then restart RG
    • Try entering notes with a French keyboard: the keyboard shows the expected layout
    • Open the shortcuts editor
      The previously defined shortcuts are always here, but the keyboard layout combo box shows "None". It should show "French".
    • Select "German" and press "Apply keyboard layout"
      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)
    • Select "None" as keyboard layout, trying to come back to the initial state.
    • Press "Apply keyboard layout"
      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?

     
  • Philip Leishman

    Philip Leishman - 2022-03-25

    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.

     
  • Yves Guillemot

    Yves Guillemot - 2022-03-25

    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.

     
  • Philip Leishman

    Philip Leishman - 2022-03-25

    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.

     
  • Yves Guillemot

    Yves Guillemot - 2022-03-25

    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".

     
  • Ted Felix

    Ted Felix - 2022-03-26

    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.

     
  • Philip Leishman

    Philip Leishman - 2022-03-26

    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 ;)

     
    👍
    1
  • Yves Guillemot

    Yves Guillemot - 2022-03-26

    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.

     
  • Ted Felix

    Ted Felix - 2022-03-26

    Merged latest as [6dda58]. I tweaked the instruction text and added a little spacing around the buttons. Please test latest git.

     

    Related

    Commit: [6dda58]

  • Philip Leishman

    Philip Leishman - 2022-03-26

    Fixed a spelling mistake and added a label as Yves suggested.
    Please merge again.

     
  • Ted Felix

    Ted Felix - 2022-03-27

    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]

  • Philip Leishman

    Philip Leishman - 2022-03-27

    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 ?

     
  • Yves Guillemot

    Yves Guillemot - 2022-03-27

    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:

          <shortcut src="," dest="M" />
          <shortcut src="Ctrl+Shift+," dest="Ctrl+Shift+M" />
    
     
  • Philip Leishman

    Philip Leishman - 2022-03-27

    OK I added the two lines.
    I updated the names as:
    English (qwerty)
    German (qwertz)
    French (azerty)
    :)

     
  • Philip Leishman

    Philip Leishman - 2022-03-29

    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.

    1. There are a few shortcuts manually set in the code (eg. MIDIInstrumentParameterPanel.cpp). I will try to replace these with entries in the rc files.
     
  • Philip Leishman

    Philip Leishman - 2022-03-29

    Oh! cut and paste again
    1. tooltips amd shortcuts
    2. Manual shortcuts

     
<< < 1 2 3 4 > >> (Page 3 of 4)

Log in to post a comment.