Tk-rv menu_generation hotkey

Hi!

Apologies if this has been asked before. I have searched for a method but couldn’t quite find one to do what I am trying to do.
I am attempting to assign a hotkey to a custom RV app. I see the source code for tk-rv’s menu_generation.py looks for a hotkey in the AppCommand.define_menu_item and passes it along to rv.commands.defineModeMenu. Anytime I assign a hotkey, the app’s title has “ERROR” prefixed to it and the app won’t load.

Using this link, Custom Hotkeys - #6 by Michael.Kessler I have assigned a hotkey as “key-down–o” and “o” seems like a hotkey that’s not used by RV internally according to this page, RV hotkeys | ShotGrid | Autodesk Knowledge Network. I have tried other hotkeys as well “key-down–alt-p”, etc, and none work.

Is there a way to assign a hotkey to an RV app that loads the app?

Thanks in advance!

Hi @prakarrendee,

Would you mind telling us what version of RV you are using and running it with Python 3 or the legacy Python 2?

If it’s not RV 2022, and you are using Python 3, make sure you are defining your hotkey in a byte array (either with b"o" or six.ensure_byte("o") (with six imported)).

Thanks,
Kerby

Hi @geffrak, I am using RV 2021 and Python 3.7. I tried six.b("o") and that worked! Thanks!

In case someone else is looking for this, it also works with modifiers, six.b("alt+o").