{"id":13439446,"url":"https://github.com/rgerganov/footswitch","last_synced_at":"2025-04-04T16:15:00.276Z","repository":{"id":4346704,"uuid":"5482678","full_name":"rgerganov/footswitch","owner":"rgerganov","description":"Command-line utility for PCsensor and Scythe foot switches","archived":false,"fork":false,"pushed_at":"2024-07-25T04:54:54.000Z","size":53,"stargazers_count":428,"open_issues_count":42,"forks_count":60,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-03-28T15:06:05.356Z","etag":null,"topics":["c","footswitch","linux","osx"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rgerganov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2012-08-20T15:03:04.000Z","updated_at":"2025-03-19T19:48:19.000Z","dependencies_parsed_at":"2024-01-23T18:14:06.902Z","dependency_job_id":"7be2ee7d-f7f1-48e8-8ecf-d628170ea574","html_url":"https://github.com/rgerganov/footswitch","commit_stats":{"total_commits":49,"total_committers":22,"mean_commits":2.227272727272727,"dds":0.6734693877551021,"last_synced_commit":"527295f6186049ddf9c7cc0fab752c63eb99dc90"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgerganov%2Ffootswitch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgerganov%2Ffootswitch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgerganov%2Ffootswitch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rgerganov%2Ffootswitch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rgerganov","download_url":"https://codeload.github.com/rgerganov/footswitch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208150,"owners_count":20901570,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","footswitch","linux","osx"],"created_at":"2024-07-31T03:01:13.979Z","updated_at":"2025-04-04T16:15:00.250Z","avatar_url":"https://github.com/rgerganov.png","language":"C","funding_links":[],"categories":["C"],"sub_categories":[],"readme":"[![Build Status](https://github.com/rgerganov/footswitch/workflows/CI/badge.svg)](https://github.com/rgerganov/footswitch/actions)\n\nFootswitch\n----------\n\nCommand line utlities for programming [PCsensor][1] and [Scythe](https://www.scythe-eu.com/en/products/pc-accessory/usb-foot-switch-ii.html) foot switches.\n\nThe following list of devices are supported:\n\n| vendorId | productId | Program       |\n| ---------|---------- | ------------- |\n| 0c45     | 7403      | `footswitch`  |\n| 0c45     | 7404      | `footswitch`  |\n| 413d     | 2107      | `footswitch`  |\n| 1a86     | e026      | `footswitch`  |\n| 3553     | b001      | `footswitch`  |\n| 0426     | 3011      | `scythe`      |\n| 055a     | 0998      | `scythe2`     |\n\nYou can find the `vendorId` and `productId` of your device using the `lsusb` command on Linux.\n\nThe same kind of foot switches are used for building the popular [VIM Clutch][2].\n\nBuilding\n--------\n\nDebian\n------\n\nOn a debian machine, provided you have `devscripts` and `equivs` installed:\n\n```bash\nmk-build-deps -i\ndpkg-buildpackage -us -uc -b\n```\n\nOr, you can build the package in a Docker container:\n\n```bash\ndocker build .\n```\nArchlinux\n---------\n\nFootswitch is available in the [AUR](https://aur.archlinux.org/packages/footswitch-git) and can be installed using your favourite AUR helper, for example:\n\n- `yay -S footswitch-git`\n- `paru -S footswitch-git`\n\n\nOther systems\n-------------\n\nThe programs are using the [hidapi][3] library and should work on Linux and OSX. To build on Linux:\n\n    sudo apt-get install libhidapi-dev\n    git clone https://github.com/rgerganov/footswitch.git\n    cd footswitch\n    make\n    sudo make install\n\nThe `install` target installs udev rules on Linux which allow running the programs without root.\nYou may need to use `sudo` otherwise.\n\nTo build on OSX:\n\n    brew tap rgerganov/footswitch https://github.com/rgerganov/footswitch.git\n    brew install --HEAD footswitch\n\nUsage\n-----\n    footswitch [-123] [-r] [-s \u003cstring\u003e] [-S \u003craw_string\u003e] [-ak \u003ckey\u003e] [-m \u003cmodifier\u003e] [-b \u003cbutton\u003e] [-xyw \u003cXYW\u003e]\n       -r          - read all pedals\n       -1          - program the first pedal\n       -2          - program the second pedal (default)\n       -3          - program the third pedal\n       -s string   - append the specified string\n       -S rstring  - append the specified raw string (hex numbers delimited with spaces)\n       -a key      - append the specified key\n       -k key      - write the specified key\n       -m modifier - ctrl|shift|alt|win\n       -b button   - mouse_left|mouse_middle|mouse_right\n       -x X        - move the mouse cursor horizontally by X pixels\n       -y Y        - move the mouse cursor vertically by Y pixels\n       -w W        - move the mouse wheel by W\n\n    You cannot mix -sSa options with -kmbxyw options for one and the same pedal\n_\n\n    scythe [-123] [-r] [-a \u003ckey\u003e] [-m \u003cmodifier\u003e] [-b \u003cbutton\u003e]\n       -r          - read all pedals\n       -1          - program the first pedal\n       -2          - program the second pedal (default)\n       -3          - program the third pedal\n       -a key      - append the specified key\n       -m modifier - ctrl|shift|alt|win\n       -b button   - mouse_left|mouse_double|mouse_right\n\n    You cannot mix -a and -m options with -b option for one and the same pedal\n\nExamples for PCsensor\n--------\n    footswitch -r\n        read the persisted function in each pedal and print it on the console\n    footswitch -k a\n        program the second pedal to print the letter 'a' (also work for single pedal devices);\n        as a general rule you don't need to specify -1, -2 or -3 if you have only one pedal\n    footswitch -1 -k a -2 -k b -3 -k c\n        program the first pedal to print 'a', second pedal to print 'b' and third pedal to print 'c'\n    footswitch -1 -k esc -2 -k enter\n        program the first pedal as Escape key and the second pedal as Enter key\n    footswitch -1 -m ctrl -k a -3 -m alt -k f4\n        program the first pedal as Ctrl+a and the third pedal as Alt+F4\n    footswitch -1 -m ctrl -k a -3 -m shift -m alt -k s\n        program the first pedal as Ctrl+a and the third pedal as Shift+Alt+s (Wikipedia \"save\")\n    footswitch -m ctrl -b mouse_middle\n        program the second pedal as Ctrl+\u003cmiddle_mouse_click\u003e\n    footswitch -s 'hello world'\n        program the second pedal to print 'hello world'\n    footswitch -s 'hello' -s ' ' -s 'world'\n        this will also program the second pedal to print 'hello world';\n        you can specify multiple -s options and each option will append to the resulting string\n    footswitch -a esc -a i\n        program the second pedal to produce Escape and then the letter 'i'\n    footswitch -s ls -a enter\n        program the second pedal to print 'ls' and then hit Enter\n    footswitch -S '29 C'\n        program the second pedal with the specified 'raw' string (hex numbers delimited with spaces);\n        you can find the hex code for each key at http://www.freebsddiary.org/APC/usb_hid_usages.php\n    footswitch -1 -x 10 -2 -w 15 -3 -y -10\n        program first pedal to move the mouse cursor 10 pixels left;\n        second pedal to move mouse wheel 15 units up;\n        third pedal to move the mouse cursor 10 pixels right\n\nExamples for Scythe\n--------\n    scythe -r\n        read the persisted function in each pedal and print it on the console\n    scythe -1 -a a -2 -a b -3 -a c\n        program the first pedal to print 'a', second pedal to print 'b' and third pedal to print 'c'\n    scythe -1 -m ctrl -a h -a o -2 -m alt -a f4 -3 -b mouse_double\n        program the first pedal as Ctrl+h+o, the second pedal as Alt+F4 and the third pedal as double click\n\nHardware issues\n--------\nSeveral people have reported misbehaviors with the PCsensor footswitch due to hardware issues.\nIf the pedal is continuously sending a keypress without being pressed, then most probably some of\nthe elements do not make good contact with the PCB. Follow the [instructions][4] contributed by @krasiyan\non how to verify and fix this.\n\nAuthor\n-------\n[Radoslav Gerganov](mailto:rgerganov@gmail.com)\n\nContributors\n-------\n* [Daniel Manjarres](mailto:danmanj@gmail.com)\n* Meng Zhang (wsxiaoys)\n\n[1]: http://www.pcsensor.com/index.php?_a=viewCat\u0026catId=2\n[2]: https://github.com/alevchuk/vim-clutch\n[3]: http://www.signal11.us/oss/hidapi/\n[4]: https://github.com/rgerganov/footswitch/issues/26#issuecomment-401429709\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgerganov%2Ffootswitch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frgerganov%2Ffootswitch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frgerganov%2Ffootswitch/lists"}