/interceptkb

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

Primary LanguageCMIT LicenseMIT

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.