Changes

QinHeng Electronics Foot Pedal

2,210 bytes added, 16:55, 29 May 2021
The following lines were added (+) and removed (-):
=== Linux ====== Linux and Mac ===Obtain the c source and compile.The programs are using the hidapi library and should work on Linux and OSX. To build on Linux:  sudo apt-get install libhidapi-dev git clone https://github.com/rgerganov/footswitch.git cd footswitch make sudo make install To build on OSX:  brew install hidapi git clone https://github.com/rgerganov/footswitch.git cd footswitch make sudo make install  Obtained the source and compiled.Command line utlities for programming PCsensor and Scythe foot switches. There is support for both single pedal devices and three pedal devices. Use the footswitch binary for the following combinations of vendorId:productId:    0c45:7403    0c45:7404    413d:2107Scythe switches with vendorId:productId=0426:3011 can be programmed with the scythe binary. You can find the vendorId and productId of your device using the lsusb command on Linux.The same kind of foot switches are used for building the popular VIM Clutch. 0x4F Keyboard RightArrow 0x50 Keyboard LeftArrow 0x51 Keyboard DownArrow 0x52 Keyboard UpArrow sudo footswitch -k wCodes taken from: http://www.freebsddiary.org/APC/usb_hid_usages.php sudo ./footswitch -S '28'In this example the 28 produces a carriage return because 28 is 0x28 Keyboard Return (ENTER) sudo ./footswitch -S '52'In this example the 52 produces up arrow press because 2 is 0x52 Keyboard UpArrowBut this is only momentary.  It is not like holding the UpArrow key depressed, so in a video game you will not keep moving forward but only just take a single step. sudo /chooser/footswitch -k upThe key name 'up' refers to the up arrow key 0x52 which in this example will act as a keyboard key so that it is _not_ momentary when the foot pedal remains depressed.THREE PEDAL SWITCH / MULTI PEDAL SWITCHFor a multi pedal switch you are not going to be able to program each pedal one at a time on individual command lines.  All three must be programmed on a single command line.  Each time the command is executed any unspecified pedals are simply set to null, therefore, even if you intend on only changing a single pedal it is still necessary to reinforce the same command on the other two.  Here is an example command line: sudo footswitch -3 -k up -1 -k down -2 -k enter
Bureaucrat, administrator
16,192
edits