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 1 of 4)
  • D. Michael McIntyre

    When we ported to Qt, we had some discussions about writing an editor for keyboard shortcuts. We used to get that from KDE automatically.

    I forget the story now, but I think somebody had some big ideas and I set them on more important tasks first. This never got done, then those people all drifted away, and have been gone for years.

    Putting a shortcut editor together with the fact that our keyboard shortcuts are translated, and can be changed by translators to differ in different languages makes the whole thing seem like an even bigger nightmare than it did before.

     
  • D. Michael McIntyre

    • Group: --> Not Likely
     
  • Anglès d'Auriac

    Using xdotool it is possible to easily map all the events (including keyboard events) of your personal window to the rosegarden events (including mouse events) so you can define any shortcuts.

     
  • Ted Felix

    Ted Felix - 2019-04-03

    Right now, the keyboard shortcuts are hard-coded in the ".rc" files. rosegardenmainwindow.rc contains most of them. But all the other .rc files (especially notation.rc and matrix.rc) should probably be consulted for conflicts as well if you intend to change them.

    You can provide your own custom .rc files in your ~/.local/share/rosegarden/rc directory. Copy from the appropriate version of the source and modify. This is, of course, dangerous, but good for trying out shortcut changes temporarily.

    Also note that .rc files can appear in /use/share/rosegarden/rc and these can cause problems when upgrading Rosegarden.

     

    Last edit: Ted Felix 2022-02-19
  • Ted Felix

    Ted Felix - 2020-02-13
    • labels: gui --> gui, shortcuts
     
  • Petr Petrov

    Petr Petrov - 2022-01-19

    good feature request!

     
  • Ted Felix

    Ted Felix - 2022-02-01
    • Group: Not Likely --> Maybe
    • Priority: 1 --> 5
     
  • Philip Leishman

    Philip Leishman - 2022-02-02

    This seems a reasonable feature request. Is it difficult ?
    One idea: All the actions go through ActionFileClient/Parser. Have the Parser write the data to a static object (singleton?) This could contain all the data (Text shortcut menu/toolbar icon..) An editor would provide overrides for this data stored in the settings. The parser would then consult this object for overrides and set the shortcuts accordingly.
    Seems doable !

     
  • Ted Felix

    Ted Felix - 2022-02-02

    The important thing about this is that a lot of users want it. That makes it higher priority than probably all the other feature requests. If you can tackle it, there would be a lot of users who would appreciate it. Right now they are modifying their .rc files, which is not a good idea.

    I'm not sure how difficult it is, but it seems rather involved. E.g. we have to be careful about the different shortcuts across the different editors. It's been done on many other Qt projects so I'm sure it's not too difficult. Might be able to look at how others have done this for ideas.

    The one thing that everyone complains about is our choice of transport shortcuts. E.g. many users want spacebar to be the usual play/pause. Right now it's punch in/out which not everyone uses. That would probably be the place to start. A set of customizable transport shortcuts that apply to all editors and the main window. See Tools > Transport for the current set of transport shortcuts. (Doing a subset is problematic, though, as it makes it possible to have overlap, but should be fine for a proof of concept.)

    It feels like a big project, but if you are up for it, it will be a much appreciated improvement.

     
  • Philip Leishman

    Philip Leishman - 2022-02-05

    I made an initial dialog showing all shortcuts. No edit function yet so not read for merging but if anyone wants to look at it and give suggestions I would be happy
    See merge request.

     
  • Ted Felix

    Ted Felix - 2022-02-09

    This looks really great. I was able to filter and find that pesky play function that everyone complains about. And I was able to filter on space and find out what the space bar is assigned to. This will be really powerful when it's done. Please keep at it.

    https://sourceforge.net/p/rosegarden/git/merge-requests/48/
    branch: feature-412-shortcuts

     
  • Ted Felix

    Ted Felix - 2022-02-09
    • assigned_to: Philip Leishman
    • Priority: 5 --> 4
     
  • Philip Leishman

    Philip Leishman - 2022-02-09

    All the filter and sort magic comes from QStandardItemModel and QSortFilterProxyModel.
    I have implemented some edit functions.
    Still missing:
    1. Actually setting the custom shortcuts - should be pretty straightforward but I will leave that until all the editing works.
    2. Some checking for double shortcuts - note this may make sense sometimes - see "Y" in the notation editor.
    Suggestions and bugs welcome!
    See merge request.

     
  • Ted Felix

    Ted Felix - 2022-02-12

    Got this crash:

    #2  0x00007ff00ca9719d in Rosegarden::ShortcutDialog::editRow()
        (this=0x7ffcb99f6a20)
        at src/gui/dialogs/ShortcutDialog.cpp:310
    #3  0x00007ff00ca96929 in Rosegarden::ShortcutDialog::setPBClicked()
        (this=0x7ffcb99f6a20)
        at src/gui/dialogs/ShortcutDialog.cpp:262
    

    I was just playing around trying to set punch record to "/" so I could get it off the spacebar. Also got a warning dialog that popped up and was completely empty. I assume it was alerting me to a conflict.

    I'm going to work up some test cases so I can give you more specific details. This was just my first time clicking on things.

     
  • Ted Felix

    Ted Felix - 2022-02-12

    Oh, and here's the DEBUG output. Looks like the -1 for srcIndex.row() wasn't caught:

    [ShortcutDialog] selection changed (QItemSelectionRange(QModelIndex(1,0,0x562e62486980,QSortFilterProxyModel(0x562e624e1af0)),QModelIndex(1,4,0x562e62486980,QSortFilterProxyModel(0x562e624e1af0))))
    [ShortcutDialog] row 1 0 selected
    [ShortcutDialog] src row 116
    [ShortcutDialog] editing key "rosegardenmainwindow.rc:record"
    [ShortcutDialog] got shortcutlist ""
    [ShortcutDialog] set keysequence ""
    [ShortcutDialog] set keysequence ""
    [ShortcutDialog] set keysequence ""
    [ShortcutDialog] set keysequence ""
    [ShortcutDialog] src row -1
    
     
  • Ted Felix

    Ted Felix - 2022-02-12

    Procedure to reproduce crash:

    • Edit > Shortcuts...
    • Filter: space
    • There will now be only two entries.
    • Select Record
    • Set the shortcut to ?
    • Warning pops up (completely blank for me)
    • Dismiss warning with "X" button in upper right.
    • Crash
     
  • Ted Felix

    Ted Felix - 2022-02-12
    • Group: Maybe --> None
     
  • Philip Leishman

    Philip Leishman - 2022-02-13

    Thanks for finding that. Setting the shortcuts can cause the selection to change!!
    Yes the dialog is empty at the moment - it will later show shortcut duplicates.
    Still very much "work in progress"

     
    👍
    1
  • Philip Leishman

    Philip Leishman - 2022-02-13

    Btw. Several classes (eg. TriggerSegmentManager) have a getShortcuts method. This does not seem to be called by anyone. Is there a reason for this ?

     
  • Ted Felix

    Ted Felix - 2022-02-13

    Btw. Several classes (eg. TriggerSegmentManager) have a getShortcuts method. This does not seem to be called by anyone. Is there a reason for this ?

    None that I can see. Some of them even return the pointer uninitialized. I would just remove them all. They appear to be ancient. Last change was 2008 when Chris renamed them: [954add]. I'd have to dig some more to figure out when they were introduced.

    Only AudioManagerDialog appears to do anything with this. It creates a shortcut for Delete and connects to it. Is that enough to make a shortcut work? The rest just create a QShortcut(this) or leave m_shortcuts uninitialized.

     

    Related

    Commit: [954add]

  • Ted Felix

    Ted Felix - 2022-02-13

    Ok, so I did the archaeology, and found [4fbef4] from 2002. Apparently those are leftovers from the way accelerators used to work back when they were called QAccel. I suspect there may not have been an .rc file back then? Anyway, not really worth figuring out. Definitely worth removing.

     

    Related

    Commit: [4fbef4]

  • Philip Leishman

    Philip Leishman - 2022-02-13

    I will remove them.

     
  • Ted Felix

    Ted Felix - 2022-02-14

    I just grabbed the latest, and now I can't get the default values back for Rosegarden main window/play. It becomes completely blank when I press "Reset to Defaults". I have no [UserShortcuts] section in my .conf and it still comes up as blank on a fresh run. It's quite strange. It's as if it can't handle the play command's shortcuts. Admittedly it's probably the most complex: "Ctrl+Enter, Enter, Media Play, Ctrl+Return". Maybe something about that is tripping it up?

    I'm also not getting the "Record" entry anymore when I filter on "space" (with nothing in the .conf file). The default for that one is "Ctrl+Space, Media Record".

    "Media" appears to be the common denominator here. With the latest version, if I filter on media, I get nothing.

    Going back to commit f0e77b fixes this issue.

     
  • Philip Leishman

    Philip Leishman - 2022-02-14

    Yes - I built in a bug !!
    As I say - work in progress.
    The latest commit should be better.

     
  • Ted Felix

    Ted Felix - 2022-02-15

    Here's my main test case. It's not quite working at the moment, but there is a workaround:

    • Clear out [UserShortcuts] in the .conf file to make sure we are starting from scratch.
    • Launch rg
    • Edit > Shortcuts...

    .
    Reassign Punch In Record to nothing.

    • Filter pattern: space
    • Select Punch In Record
    • Clear out the first shortcut field by pressing Shift.
    • Press Set Shortcuts
    • Punch In Record should disappear

    .
    Assign Play to spacebar.

    • Filter: play
    • Select RMW Play
    • Set the first shortcut field to spacebar. Clear out the rest with Shift.
    • Press Set Shortcuts
    • RMW Play should now be nothing other than "space".
    • Close shortcuts window and rg.

    .
    Confirm changes and new behavior.

    • Examine the .conf file. Right now there is only an entry for play, no entry to clear out "punch in record". I suspect this is why it isn't working.
    • On restart of rg, spacebar should be play.

    .
    If I go through the same process, but set record to "\", spacebar becomes play as expected. So, it appears as if some way to indicate "cleared" or "empty" is needed in the .conf file.

     

    Last edit: Ted Felix 2022-02-15
1 2 3 4 > >> (Page 1 of 4)

Log in to post a comment.