Toggle Switch for Alt

What features you would like to have in HIDmacros?
Post Reply
A11out
Posts: 2
Joined: 12 Oct 2017, 02:59

Toggle Switch for Alt

Post by A11out » 12 Oct 2017, 03:13

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.

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

Re: Toggle Switch for Alt

Post by admin » 12 Oct 2017, 08:44

You can't do it in HIDmacros.
Maybe in luamacros with lmc_send_input, but you need scripting/programming knowledge to use luamacros.
Petr Medek
LUAmacros author

A11out
Posts: 2
Joined: 12 Oct 2017, 02:59

Re: Toggle Switch for Alt

Post by A11out » 12 Oct 2017, 13:04

Ahh, it sucks. I'll try to find a way around that.

Thanks for the reply!

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest