Page 1 of 1

Toggle Switch for Alt

Posted: 12 Oct 2017, 03:13
by A11out
Hello,

I'm not a programmer in any way and I need your help. I figured out, as best as I could, the majority of HID features I needed. Except for one. I cannot figure out how to emulate toggle switch for alt key. I need it for photoshop. There, if you press and hold alt - eyedropper tool appears a very useful feature for quickly fetching colors. So, basically, I'm trying to emulate that. I tried multiple things and nothing works. Could you please walk me through, step by step, how to do that?

What I tried:

1. SImply putting % to "Send keyboard sequence". It sends ALT command over and over again when pressed down, the eyedropper tool flashes, but is unusable.
2. Leaving the above in place, I went to Scripted tab. The device I'm trying to program is external numpad. So, it is NOT a game device. The button I tried to assign is 0. In the info, the device is Keyb2, and the trigger is 96 (0). So, I put the following in scripted.

' set NAV1 or NAV2 radio based on toggle switch
if HIDMacros.IsButtonPressed("Keyb2", 96) then
HIDMacros.FSXEvent "NAV1_STBY_SET", &h11450
else
HIDMacros.FSXEvent "NAV2_STBY_SET", &h11450
end if

It did nothing. I tried to put in 96 (0) and got an error. I tried other variations of names and nothing worked. This is a far as I got on that.

Oh, and the reason I do not have access to alt key when I draw - I use 2 in 1 laptop, and the keyboard (and all the hotkeys I got used to) are inactive when in tablet mode.

Re: Toggle Switch for Alt

Posted: 12 Oct 2017, 08:44
by admin
You can't do it in HIDmacros.
Maybe in luamacros with lmc_send_input, but you need scripting/programming knowledge to use luamacros.

Re: Toggle Switch for Alt

Posted: 12 Oct 2017, 13:04
by A11out
Ahh, it sucks. I'll try to find a way around that.

Thanks for the reply!