Page 1 of 1

Ctrl right and Ctrl left

Posted: 25 Oct 2019, 13:06
by MmonkeyDX
Hi, there's a way to distinguish right and left Control? Hidmacros show event 17() for bot control.
I'm using a little program with default hotkeys that i can't change. These hotkeys are indeed ctrl right and ctrl left.
So i'm trying without success to assign to my external numpad different macros for right and left control.
Any suggestion? Thanky you all! ;)

Re: Ctrl right and Ctrl left

Posted: 28 Oct 2019, 17:55
by admin
In LuaMacros yes, in HidMacros I don't remember (maybe not)

Re: Ctrl right and Ctrl left

Posted: 30 Nov 2019, 22:55
by peewee
You can, make sure the log handler is created like this:

Code: Select all

log_handler = function( button,direction,ts,flags,makecode )
Then the left and right CTRL keys returns different flags 0,1 for press and release the left one, 2 and 3 for the right.

You check by just adding editing your if-statement like this:

Code: Select all

if ( button == 17  and flags < 2 )
for the left CTRL or

Code: Select all

elseif ( button == 13  and flags > 1 )
for the right.

Add this line to your log handler and you can sniff these out yourself:

Code: Select all

print('CALLBACK :: Button ' .. button .. ', direction '..direction..', makecode: ' ..makecode.. ', flags '..flags)