Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1.05 KB

README.md

File metadata and controls

43 lines (29 loc) · 1.05 KB

interceptkb

build

Intercept events from a keyboard (like the FS1-P foot pedal) and output another key instead, using uinput.

Requirements

This only works on Linux.

Build

  • Debug:

    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE="Debug" ..
    cmake --build .
  • Release:

    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_C_FLAGS="-s" ..
    cmake --build .

Usage

./interceptkb [KEY_CODE] [INPUT_PATH]

For example, to output the left meta (Windows) key from the FS1-P foot pedal:

./interceptkb 125 dev/input/by-id/usb-RDing_FootSwitch1F1.-event-kbd

See here for a list of input event codes.