Changing quadstick mode through AHK

71 views
Skip to first unread message

dore...@gmail.com

unread,
Apr 17, 2022, 11:24:33 AM4/17/22
to QuadStick
hi everyone.
I know this topic has already been touched in the past, but in my care, I've to deal with the fact I'm not scripting with AHK directly, but with UCR instead which is a remapper made with AHK that can, actually, run code as well.

I already took this topic as reference

My main question if there is any way to have the run command run without variables, as UCR does not store variables efficiently as an AHK script does.

Thanks in advance!

dore...@gmail.com

unread,
Apr 17, 2022, 12:15:04 PM4/17/22
to QuadStick
Update 02 (hopefully Red can answer here?..)
QMDSend isn't working on my end, neither as a cmd run think nor as a windows shortcut for some reason..

Fred Davison

unread,
Apr 17, 2022, 3:28:21 PM4/17/22
to dore...@gmail.com, QuadStick
QMP has to be running and have a serial connection (wire or bluetooth) or a USB connection to the Quadstick (Enable voice commands over USB on).   QMPSend just sends a command string to QMP, which relays the command to the Quadstick.

Make sure the "Load and run in Quadstick" button on the games tab is working before trying QMPSend.  Also, just running QMPSend by itself will not do anything.  It has to have a command string on the command line.

Here's the properties box for a shortcut that resets the Quadstick's outputs all to "off" and clears any latches or toggles:

image.png

You should hear a "blip" sound when it runs.

The command is "reset", but it could be "mode,2" or "increment mode", or anything else.




--
You received this message because you are subscribed to the Google Groups "QuadStick" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quadstick+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quadstick/557a8a99-e4f1-4ee2-8830-2f231758cf27n%40googlegroups.com.

dore...@gmail.com

unread,
Apr 17, 2022, 3:34:01 PM4/17/22
to QuadStick
Yeah I tried the shortcut thing like that, but had no success.
Also, load and runfile in Quadstick is grayed out for me. Quadstick is on an USB port so I can't unerstand why?..

I'm not trying to have voice commands, I just want to switch modes/files with my eyegaze's kayboard since I keep doing it unwillingly all the time

Fred Davison

unread,
Apr 17, 2022, 3:42:14 PM4/17/22
to dore...@gmail.com, QuadStick
The voice commands are what the shortcuts send.  It doesn't need to start with an actual spoken command processed through a speech to text program.

I am assuming your quadstick is connected to the PC.  Enable voice commands over USB on the Misc tab will need to be on, and the preferences saved to the quadstick.

dore...@gmail.com

unread,
Apr 17, 2022, 3:52:03 PM4/17/22
to QuadStick
Yes I found it and turned it on via the pref file, so now increment and decrement do work, but modes like "mode,2" always go to mode 1 regarless of the number I put in unfortunately (which was the best in my case)

Fred Davison

unread,
Apr 17, 2022, 4:33:15 PM4/17/22
to dore...@gmail.com, QuadStick
It is working here.  I loaded your default.csv and can issue a command to switch to mode 2.

I would attach sample shortcuts but gmail is blocking them.  Even inside a zip file.  Even inside an encrypted zip file.

Here are the target strings:

"D:\Users\fdavison\Documents\GitHub\QMP\QuadStick Manager Program\dist\QMPSend.exe" "mode,2"

"D:\Users\fdavison\Documents\GitHub\QMP\QuadStick Manager Program\dist\QMPSend.exe" "increment_mode"

"D:\Users\fdavison\Documents\GitHub\QMP\QuadStick Manager Program\dist\QMPSend.exe" "reset"

You will need to change the first part to match your computer.

Make sure you use double quotes ("), not single quotes (')

No spaces in the string "mode,2"






dore...@gmail.com

unread,
Apr 17, 2022, 5:50:18 PM4/17/22
to QuadStick
  I believe the problem is my computer has commas and dots inverted unfortunately, even its logs shows me like there is no comma at all
immagine_2022-04-17_235008433.png

Fred Davison

unread,
Apr 17, 2022, 6:00:32 PM4/17/22
to dore...@gmail.com, QuadStick
Try putting dots in the target string and see if it comes out as a comma.

Fred Davison

unread,
Apr 17, 2022, 6:09:43 PM4/17/22
to dore...@gmail.com, QuadStick
If that doesn't work, I'll make an update to accept either dots or commas.   You are 99% there.

dore...@gmail.com

unread,
Apr 17, 2022, 6:29:51 PM4/17/22
to QuadStick
Yeah, commas just disappear, while dots show up but do nothing unfortunately

Fred Davison

unread,
Apr 17, 2022, 6:39:57 PM4/17/22
to dore...@gmail.com, QuadStick
I was looking through the code to see what to change and the comment was

// any character not alphanumeric, or in: "_. -" is a separator character.  For example, comma is a separator.

I tried ! as a separator and it worked.  "mode!2" worked OK.

dore...@gmail.com

unread,
Apr 17, 2022, 6:50:28 PM4/17/22
to QuadStick
Yeah can confirm! ! works just fine, I wonder if I can trigger toggles as well this way, or generally any input.
There are many games who do not take AHK as inputs, but only real hardware ones, so having the Quadstick pass an input given from there would actually help a lot.

Fred Davison

unread,
Apr 17, 2022, 8:06:03 PM4/17/22
to dore...@gmail.com, QuadStick
I don't think you can actually toggle keys on permanently.  You can hold them down for a long time and then clear it.   The voice commands were not really meant for keyboard keys since the voice command programs themselves had superior keyboard commands.

"kb_w!1!100!-1"   Would force the state of the W key on until it was forced off with a reset or a timed command was given.     It might be better to just put a long timer value.

A brief tap of the key would be "kb_w", without any parameters, since the default time is 200 ms.

The output used by the command must be part of the configuration profile, even if it has no input assigned to it.  In the CSV file:

kb_w, normal, (then nothing for an input)

That creates the kb_w output object that maintains the state of the button.  If the output is not in the running profile, nothing will happen with the voice command since the output doesn't exist at that moment.


Here are the console commands:

The QuadStick understands the following words and phrases:

  output_name, state, value, duration   where:
    output_name is the output's name, like square, circle, triangle.
    state is 1 for ON, 0 for OFF and -1 for TOGGLE state.  Default is 1.
    value is 0 to 100 in percent. Default is 100.
    duration is in milliseconds or -1 for Permanent. Default is 200.

Example:
  circle,1,50,500<enter> will press the circle button at 50% for 500 milliseconds
  right_3,-1,100,-1<enter> will Toggle the R3 button until a new command is given
  square<enter> will press the square button firmly for 200 milliseconds.

Direct commands:

help                         This message
outputs                      Prints list of output names
reset                        Clears all outputs to idle state
mode,number                  Sets profile mode directly to specified number
load,filename.csv            Loads new configuration profile\
swap[,output_name]           Swaps output_name to Lip sensor (or clears swap if blank)
and,output_name              Adds second output_name to swap with Lip sensor
boot                         Force immediate hard reset of QuadStick
debug                        Turns on printing of raw debug data stream
echo                         Toggle current character echo state
print                        Prints configuration settings

Names of outputs that can be used in console commands:

  dpad_N
  dpad_NE
  dpad_E
  dpad_SE
  dpad_S
  dpad_SW
  dpad_W
  dpad_NW
  left_joy_left
  left_joy_right
  left_joy_up
  left_joy_down
  right_joy_left
  right_joy_right
  right_joy_up
  right_joy_down
  left_1
  left_2
  left_3
  right_1
  right_2
  right_3
  x
  square
  triangle
  circle
  ps3
  select
  start
  acceleration_x_left
  acceleration_x_right
  acceleration_y_fore
  acceleration_y_aft
  acceleration_z_down
  acceleration_z_up
  gyroscope_x_cw
  gyroscope_x_ccw
  gyroscope_y_ccw
  gyroscope_y_cw
  gyroscope_z_ccw
  gyroscope_z_cw
  touch_right
  touch_left
  touch_down
  touch_up
  touch
  mouse_left
  mouse_right
  mouse_up
  mouse_down
  mouse_wheel_up
  mouse_wheel_down
  mouse_pan_left
  mouse_pan_right
  mouse_back
  mouse_forward
  mouse_left_button
  mouse_right_button
  mouse_middle_button
  digital_out1_on
  digital_out1_off
  digital_out1_toggle
  digital_out_1
  digital_out2_on
  digital_out2_off
  digital_out2_toggle
  digital_out_2
  digital_out3_on
  digital_out3_off
  digital_out3_toggle
  digital_out_3
  digital_out4_on
  digital_out4_off
  digital_out4_toggle
  digital_out_4
  increment_mode
  decrement_mode
  load_file
  kb_a
  kb_b
  kb_c
  kb_d
  kb_e
  kb_f
  kb_g
  kb_h
  kb_i
  kb_j
  kb_k
  kb_l
  kb_m
  kb_n
  kb_o
  kb_p
  kb_q
  kb_r
  kb_s
  kb_t
  kb_u
  kb_v
  kb_w
  kb_x
  kb_y
  kb_z
  kb_1
  kb_2
  kb_3
  kb_4
  kb_5
  kb_6
  kb_7
  kb_8
  kb_9
  kb_0
  kb_enter
  kb_escape
  kb_backspace
  kb_tab
  kb_space
  kb_minus
  kb_equal
  kb_opening_bracket
  kb_closing_bracket
  kb_backslash
  kb_non_us_hashmark_and_tilde
  kb_semicolon
  kb_apostrophe
  kb_grave_accent_and_tilde
  kb_comma
  kb_dot
  kb_slash
  kb_caps_lock
  kb_f1
  kb_f2
  kb_f3
  kb_f4
  kb_f5
  kb_f6
  kb_f7
  kb_f8
  kb_f9
  kb_f10
  kb_f11
  kb_f12
  kb_printscreen
  kb_roll_lock
  kb_pause
  kb_insert
  kb_home
  kb_page_up
  kb_delete
  kb_end
  kb_page_down
  kb_right_arrow
  kb_left_arrow
  kb_down_arrow
  kb_up_arrow
  kb_num_lock
  kb_keypad_slash
  kb_keypad_asterisk
  kb_keypad_minus
  kb_keypad_plus
  kb_keypad_enter
  kb_keypad_1
  kb_keypad_2
  kb_keypad_3
  kb_keypad_4
  kb_keypad_5
  kb_keypad_6
  kb_keypad_7
  kb_keypad_8
  kb_keypad_9
  kb_keypad_0
  kb_keypad_dot
  kb_non_us_backslash_and_pipe
  kb_application
  kb_power
  kb_equal_sign
  kb_left_control
  kb_left_shift
  kb_left_alt
  kb_left_gui
  kb_right_control
  kb_right_shift
  kb_right_alt
  kb_right_gui



Reply all
Reply to author
Forward
0 new messages