<commit_before>[![Build Status](https://github.com/rgerganov/footswitch/workflows/CI/badge.svg)](https://github.com/rgerganov/footswitch/actions)

Footswitch
----------

Command line utlities for programming [PCsensor][1] 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:2107`
 * `1a86:e026`

Scythe 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][2].

Building
--------

The programs are using the [hidapi][3] 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:
<commit_msg>Add note in the README about the usage of sudo<commit_after>[![Build Status](https://github.com/rgerganov/footswitch/workflows/CI/badge.svg)](https://github.com/rgerganov/footswitch/actions)

Footswitch
----------

Command line utlities for programming [PCsensor][1] 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:2107`
 * `1a86:e026`

Scythe 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][2].

Building
--------

The programs are using the [hidapi][3] 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

The `install` target installs udev rules on Linux which allow running the programs without root.
You may need to use `sudo` otherwise.

To build on OSX:

{'fraction_non_alphanumeric': 0.1032487761459724, 'fraction_numerical': 0.03382287494437027, 'mean_word_length': 4.120728929384966, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4163775', 'n_tokens_mistral': 748, 'n_tokens_neox': 685, 'n_words': 263}