Multiple key bindings for the one action?

Hi,

Is it possible to have multiple keys bound to the same action?

There seem to be a small number of actions which have 2 slots in the keybinding table (and I think in the ardour6.keys file the 2nd action is prefixed with “alternate-”) - is this just a hack for certain actions, or is there a general way of doing this that I’m missing?

Why do I want to do this? I’m building a little USB widget that generates the ‘transport control’ keys (stop/record/play etc) and I’d like to be able to bind eg both the XF86AudioRecord and Shift-r to the ‘Record’ action - so I don’t have to remap the keys if I don’t have my widget plugged in.

Cheers

David

Hi Davidm, welcome to the Ardour forums.

You can definitely bind more than one key to the same action. There are also different domains for bindings, so the same key can do more than one thing depending on the context.

What you can’t do it use the keyboard shortcut editor to make this happen, because when you bind key2 to an action already bound to key1, it will unbind key1 first (hence the alternate-XXX actions to permit this).

You can do it by manually editing your ardour keyboard shortcut bindings, found in ~/.config/ardour/ardour.keys (created after any edits in the shortcut editor).

Be aware that the bindings do not use “Ctrl”, “Shift” etc. We use OS-portable names like “Primary” (Ctrl on Linux), “Secondary” (Alt on Linux), “Tertiary” (Shift on Linux).

1 Like

Hmm. That doesn’t appear to be working. Whichever one is first in the keys file seems to win:
If I’ve got this:

      <Binding key="XF86AudioRecord" action="Transport/Record"/>
      <Binding key="Tertiary-r" action="Transport/Record"/>

my button works, but Shift-r does not. If I’ve got this:

      <Binding key="Tertiary-r" action="Transport/Record"/>
      <Binding key="XF86AudioRecord" action="Transport/Record"/>

the opposite happens (Shift-r works, button does not).

Ardour version is 6.9 (well Ardour 6.9.0~ds0 “After Bach” (rev 6.9.0~ds0-1build1) Intel 64-bit on Ubuntu 22.04.1)

Anything I can do to debug this?

Cheers

David

I’ll check into this tomorrow. I may have been mistaken that we allow N:1 mappings.