@keydown modifier and touchpad middle click

Hello, I've made a 3 button, in the middle click editor I put @keydown:ctrl, but it never gets triggered when I Ctrl+MiddleClick the button. It's working fine on Ctrl+RightClick.

It seems to work fine with my test button:

Left click: Help ABOUT
Right click: Help LICENCEMANAGER
Middle click:

@keydown:ctrl
Prefs
@keydown:none
Print FOLDER

Ctrl + middle click opens the Prefs window while a normal middle click opens the Print Folder dialog.

<?xml version="1.0"?>
<button backcol="none" display="icon" label_pos="right" textcol="none" type="three_button">
	<label>New Button</label>
	<icon1>#newcommand</icon1>
	<button backcol="none" display="icon" label_pos="right" textcol="none">
		<label>New Button</label>
		<icon1>#newcommand</icon1>
		<function type="normal">
			<instruction>Help ABOUT</instruction>
		</function>
	</button>
	<button backcol="none" display="icon" label_pos="right" textcol="none">
		<label>New Button</label>
		<icon1>#newcommand</icon1>
		<function type="normal">
			<instruction>Help LICENCEMANAGER</instruction>
		</function>
	</button>
	<button backcol="none" display="icon" label_pos="right" textcol="none">
		<label>New Button</label>
		<icon1>#newcommand</icon1>
		<function type="normal">
			<instruction>@keydown:ctrl</instruction>
			<instruction>Prefs</instruction>
			<instruction>@keydown:none</instruction>
			<instruction>Print FOLDER</instruction>
		</function>
	</button>
</button>

Thanks Leo, it does work correctly, I tested on my desktop PC.

I have a strange issue on my laptop, it works correctly if I use the right control (or right shift) key but does not work when using the left control (or left shift) key. Can you think of any reason why this might be?

Having inspected the key codes with AutoHotkey (I exited all AutoHotkey scripts while testing):

LShift: Virtual Key: A0, Scan Code: 02A
RShift: Virtual Key: A1, Scan Code: 136
LControl: Virtual Key: A2, Scan Code: 01D
RControl: Virtual Key: A3, Scan CodeL 11D

Many thanks for any advice you have.

I'm not sure what's happening there. The virtual key codes are correct, and the check should see left and right Ctrl keys the same anyway (it's testing VK_CONTROL rather than VK_LCONTROL or VK_RCONTROL individually).

It's also odd that it works OK with the right button action but not the middle. Does the left button action work OK?

You could try turning off Preferences / Toolbars / Options / Simulate middle mouse click with control + left click, which might be involved, but from my own testing it shouldn't make a difference here.

Thanks for the suggestions, what I discovered is that the 3 finger tap on the touchpad doesn't actually send a middle-click, instead it sends LWin+LCtrl+LShift+F22, it's pretty weird.

Sorry for wasting your time, it's not an Opus issue.

1 Like