Strange Hotkey behaviour with Ctrl key


I have a toolbar button that toggles Dual mode with the following code:

Set DUAL=toggle,remember,horiz,right,dest

When you click it with the mouse the 2nd pane appears and the focus stays with the original pane at the top.

The original hotkey was F9 or something which also worked fine but I wanted to change it to Ctrl-D. When I did that the behaviour changed...the 2nd pane would take the focus when you use Ctrl-D instead of it remaining with the 1st pane. If you press it repeatedly it switches the source and destination each time it closes / opens. If you click the same button with the mouse it still works normally as above!

The only way I could get this function to work properly with Ctrl-D was to set up a separate Hotkey and add "source" instead of "dest". For some reason it seems the Ctrl key is making the action focus on the opposite pane than when you click the button...any idea why this might be the case?

Incidentally, using Alt-D works as expected. It only seems to be the Ctrl modifier that reverses the panes.


It looks like the "right" and "dest" arguments don't work together. Try this as an alternative:

Set SOURCE=left Set DUAL=toggle,remember,horiz,dest

That seems to work for me.

Yeah, I can get the function to do what I want. The problem is if you assign exactly the same code to two different hotkeys, Ctrl + D and say Alt + D, they behave differently!

Set DUAL=toggle,remember,horiz,right

The hotkey with Ctrl will give focus to the right pane.
The hotkey with Alt will keep focus with the left pane.

That has to be a bug of some sort, you would expect the same code to behave the same way irrespective of the hotkey assigned to it :slight_smile:


When source/dest isn't explicitly specified, a default is chosen (from the corresponding checkbox in Preferences) and Ctrl reverses the meaning. It's a feature, or at least by-design, not a bug. It means the default button can work both ways and have its meaning reversed if Ctrl is held down. (A bit like how the Delete button by default uses the recycle bin unless Shift is held down.)

If you don't want Ctrl to reverse the meaning, you have to explicitly specify source/dest (which also overrides the left/right argument, but that can be worked around using the command in my reply above).

Ahh ok, that explains it. Thanks, Leo :slight_smile: