0

Setting hotkeys (or menus...?)

Is a there a way to customize hotkeys, other than editing rvui.mu directly?

This works, but makes it's a big pain to then port your hotkey setup between rv versions...

And while I'm at it, might as well get greedy - is it possible to edit menus (or override them) without editing rvui?

- Paul

6 comments

  • 0
    Avatar
    Seth Rosenthal

    Hey Paul,

    Yeah, we understand the issue. You can customize hotkeys to a large extent by writing a separate package for RV. This makes it easier to install and avoids the issue of porting for each RV version. We can help a bit with that if you are interested. If you tell us what kinds of changes you need to make we may be able to advise or give you an example package to start with (you might want to start a help ticket for that).

    Editing menus is another tricky thing. At this point you can easily add to menus from a package, but editing the existing ones requires editing  rvui.mu.

    In order to make all of this easier, we need to make a few core changes to how we manage all of the menus and hotkeys. We are working out the best way to do this and hopefully we will schedule it sometime next year.

    So, this is definitely a glass half empty or half full kind of thing. It's currently very powerful, but we think we can make it a lot more accessible and easy to do.

    Cheers,

    Seth

  • 0
    Avatar
    Nathan Rusch

    I'm in this situation as well... Is all of this still valid?

  • 0
    Avatar
    Alan Trombla

    Hi Nathan,

    Yes, broadly this is the case.  In this upcoming release we've cleaned up a couple things, sot that you can (still by writing code, mind you):

    • Change an accelerator (shortcut/hotkey) on an existing menu item
    • Change the action performed by an existing menu item

    And you can do this from outside rvui, so your changes aren't wiped by a new version.  But this is just a stop-gap, and we recognize that this could/should be much better.

    Alan

  • 0
    Avatar
    Pedrooconnell

    Hi I am interested in changing the action performed by an existing menu item as well. Could you post some sample code that works outside of rvui.

    Thanks

    Pete

  • 0
    Avatar
    Nathan Rusch

    Hey Pete,

    You basically build another copy of the menu as defined by rvui, and then loop through and alter the items you want. Not necessarily clean, but it works. Here's some example code (called in a mode's constructor method):

    ---------------------------------

    Menu mainMenu = buildMainMenu();
    for_each (menu; mainMenu) {
        if (menu.label == "File") {
            for_each (subItem; menu.subMenu) {
                if (subItem.label == "Save Session") {
                    subItem.key = nil;
                    break;
                }
            }
        }
        else if (menu.label == "Tools") {
            for_each (subItem; menu.subMenu) {
                if (subItem.label == "   Sequence") subItem.key = "\"";
                else if (subItem.label == "   Replace") subItem.key = ":";
            }
        }
        else if (menu.label == "Image") {
            for_each (subItem; menu.subMenu) {
                if (subItem.label == "Pixel Aspect Ratio") {
                    for_each (subSubItem; subItem.subMenu) {
                        if (subSubItem.label == "Square") subSubItem.key = "alt a";
                        else if (subSubItem.label == "Anamorphic  2:1") subSubItem.key = "control a";
                    }
                }
                else if (subItem.label == "Cycle Stack Forward") subItem.key = "'";
                else if (subItem.label == "Cycle Stack Backward") subItem.key = ";";
            }
        }
    }
    defineModeMenu("default", mainMenu);

  • 0
    Avatar
    Pedrooconnell

    Hi Nathan thanks for your response. That seems to be what I am looking for. I assume I have to save this file as a mu file and put it in a users plugin path somewhere?

    I can't find much documentation about this. If you know of any please point me to it! 

    Thanks

    Pete

Please sign in to leave a comment.