Ctrl right and Ctrl left

How can be this controlled in that simulator? Can HIDmacros be used with this application?
Post Reply
MmonkeyDX
Posts: 3
Joined: 22 Oct 2019, 18:11

Ctrl right and Ctrl left

Post by MmonkeyDX » 25 Oct 2019, 13:06

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! ;)

admin
Site Admin
Posts: 735
Joined: 01 Nov 2010, 13:00
Location: Prague, Czech republic
Contact:

Re: Ctrl right and Ctrl left

Post by admin » 28 Oct 2019, 17:55

In LuaMacros yes, in HidMacros I don't remember (maybe not)
Petr Medek
LUAmacros author

peewee
Posts: 10
Joined: 30 Mar 2019, 13:43

Re: Ctrl right and Ctrl left

Post by peewee » 30 Nov 2019, 22:55

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)

Post Reply