P.I. Engineering User Forum

Product Support, Technical Questions and Answers, and Examples for P.I. Engineering Products

You are not logged in.

#1 2017-10-24 03:11:49

jsokolic
Member
Registered: 2017-10-24
Posts: 1

Repeat macro command

Can anyone help me, I would like to set my XK-24 keypad
to "spam" one key, for example when I press key on XK-24
that is starts to type letter "E" and repeat that process every
1 second until same key on XK-24 is pressed again, something
like the toggle function.

Is this possible? I tried doing so with Auto repeat function
when creating macro, but it does not work that way.

If this is possible and if someone would be so kind to share code
with me it would be very much appreciated.

Offline

#2 2017-10-24 08:14:39

PIE Liam
Technical Support Specialist
From: Williamston, MI
Registered: 2016-01-21
Posts: 48
Website

Re: Repeat macro command

It is possible but not advisable since "Stuck Key" events can cause unforeseen issues. However, if you'd like to try it, you would need to combine two concepts, standard Keystrokes and Layers. It would look something like this:

In Hardware mode:
On Layer 1 : program a "Device Layer_2" function then a Keystroke "a" (PAUSE the programming and delete the "A" Up portion), and finally an "Auto Repeat" function.
On Layer 2:  program a "Device Layer_1" function then an "A UP" keystroke.
What we are left with is a toggle key that will spam, the letter A. You will need to play around with the order and timing of the functions but I've given you the basic idea.

Offline

Board footer

Powered by FluxBB