QinHeng Electronics Foot Pedal

Revision as of 18:32, 21 December 2020 by Littleguy (Talk | contribs)

USB Foot Pedal for a PC by QinHeng Electronics - device OS independent (Linux, Windows, etc).

This is a series of foot pedal switches that appear unbranded and are sold on ebay. There is a single pedal version and a three pedial version. The foot switch connects to the computer by a USB interface. The foot pedal is programmed into its own firmware with a character or string that will be sent to the computer via input I/O when depressed, much like a keyboard does when a key is depressed. Consider that it functions like a keyboard which has only a single key.

Programming software included with the device is Windows only even though the devices is marketed as OS independent. An independent developer created a utility using the C programming language and can be executed on Linux.

$ ls -l ./by-id|grep e026
lrwxrwxrwx 1 root root 9 Feb  9 15:12 usb-1a86_e026-event-mouse -> ../event9
lrwxrwxrwx 1 root root 6 Feb  9 15:12 usb-1a86_e026-mouse -> ../js0
$ udevadm monitor --udev

monitor will print the received events for:

UDEV - the event which udev sends out after rule processing

udevadm monitor [options]
      Listens to the kernel uevents and events sent out by a udev rule and prints the devpath of the event to the console. It can be used to analyze the event timing, by comparing the timestamps of the kernel uevent and the udev
      event.

      -k, --kernel
          Print the kernel uevents.

      -u, --udev
          Print the udev event after the rule processing.

      -p, --property
          Also print the properties of the event.

      -s, --subsystem-match=string[/string]
          Filter kernel uevents and udev events by subsystem[/devtype]. Only events with a matching subsystem value will pass.

      -t, --tag-match=string
          Filter udev events by tag. Only udev events with a given tag attached will pass.

$ footswitch Usage: footswitch [-123] [-r] [-s <string>] [-S <raw_string>] [-ak <key>] [-m <modifier>] [-b <button>] [-xyw <XYW>]

  -r          - read all pedals
  -1          - program the first pedal
  -2          - program the second pedal (default)
  -3          - program the third pedal
  -s string   - append the specified string
  -S rstring  - append the specified raw string (hex numbers delimited with spaces)
  -a key      - append the specified key
  -k key      - write the specified key
  -m modifier - ctrl|shift|alt|win
  -b button   - mouse_left|mouse_middle|mouse_right
  -x X        - move the mouse cursor horizontally by X pixels
  -y Y        - move the mouse cursor vertically by Y pixels
  -w W        - move the mouse wheel by W
You cannot mix -sSa options with -kmbxyw options for one and the same pedal
$ sudo footswitch -r
[switch 1]: a
[switch 2]: b
[switch 3]: c
$ sudo footswitch -1 w
$ sudo footswitch -2 w
$ sudo footswitch -3 w
$ sudo footswitch -r
[switch 1]: unconfigured
[switch 2]: unconfigured
[switch 3]: unconfigured
$ sudo footswitch -1
$ sudo footswitch -k w
$ wwwwwwwwwwww
Last modified on 21 December 2020, at 18:32