Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trigger if key pressed for time?
#7
QM keyboard triggers don't tell you how long the key was pressed. Need another keyboard trigger engine. This function is basic code for it. Current version just gives you virtual-key code and key-pressed duration when a key is released. It does not "eat" keys. Need some more programming to make it do what you want.

This function must be running all the time. If you want to end it, run it again. It should not have a keyboard trigger.

To run macros, edit the "out t" part. Add code that launches macros (use mac) depending on values of vk (virtual-key code) and t (duration in milliseconds). The macros will run on key up event. Better place the code in other function, and call it from this function like "MyKeyTriggerFunction vk t".


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)