skorotkiewicz/midi-hook

Map MIDI keyboard notes to shell commands and keyboard shortcuts.

4

stars

53

commits

Rust

primary language

Aug 26, 2026

updated

sekor.eu.org/midi-hook
automation
keyboard-shortcuts
linux
midi
midi-keyboard
rust

README

MIDI Hook banner

MIDI Hook

Release Build AUR

Map MIDI notes, chords, sequences, pedals, knobs, faders, and pitch bend to keyboard actions or shell commands on Linux, Windows, and macOS.

Install

Arch Linux:

yay -S midi-hook

Other platforms can download a binary from GitHub Releases or build from source:

cargo build --release

Before setup, follow the short platform permission instructions.

Quick start

Create mappings interactively:

midi-hook setup

Test what your controller sends:

midi-hook test
midi-hook test --details  # Every raw MIDI message

Start listening:

midi-hook commands.conf

Press Enter or Ctrl+C to stop.

Configuration example

device = RockJam BT MIDI:RockJam BT MIDI Bluetooth 128:0
60 = shortcut ctrl+alt+t
61 = command echo "note 61"
60+64+67 = command echo "chord"
48>50>52 = command echo "sequence"
65 [vel=100..127] = command echo "hard press"
cc 64 = command echo "pedal {value}"
cc 76 = command echo "volume {percent}%"
pitch = command echo "pitch {value}"

Run midi-hook setup instead of writing native key codes by hand. See REFERENCE.md for every trigger, action, platform requirement, LED feedback, and command behavior.

Start automatically on Linux

Packaged Linux releases include an optional systemd user service:

mkdir -p ~/.config/midi-hook
cp commands.conf ~/.config/midi-hook/commands.conf
systemctl --user enable --now midi-hook

View its logs:

journalctl --user -u midi-hook -f

The package installs the service but never enables it automatically.

Contributors

skorotkiewicz

53 commits

skorotkiewicz/midi-hook

Map MIDI keyboard notes to shell commands and keyboard shortcuts.

4

stars

53

commits

Rust

primary language

Aug 26, 2026

updated

sekor.eu.org/midi-hook
automation
keyboard-shortcuts
linux
midi
midi-keyboard
rust

README

MIDI Hook banner

MIDI Hook

Release Build AUR

Map MIDI notes, chords, sequences, pedals, knobs, faders, and pitch bend to keyboard actions or shell commands on Linux, Windows, and macOS.

Install

Arch Linux:

yay -S midi-hook

Other platforms can download a binary from GitHub Releases or build from source:

cargo build --release

Before setup, follow the short platform permission instructions.

Quick start

Create mappings interactively:

midi-hook setup

Test what your controller sends:

midi-hook test
midi-hook test --details  # Every raw MIDI message

Start listening:

midi-hook commands.conf

Press Enter or Ctrl+C to stop.

Configuration example

device = RockJam BT MIDI:RockJam BT MIDI Bluetooth 128:0
60 = shortcut ctrl+alt+t
61 = command echo "note 61"
60+64+67 = command echo "chord"
48>50>52 = command echo "sequence"
65 [vel=100..127] = command echo "hard press"
cc 64 = command echo "pedal {value}"
cc 76 = command echo "volume {percent}%"
pitch = command echo "pitch {value}"

Run midi-hook setup instead of writing native key codes by hand. See REFERENCE.md for every trigger, action, platform requirement, LED feedback, and command behavior.

Start automatically on Linux

Packaged Linux releases include an optional systemd user service:

mkdir -p ~/.config/midi-hook
cp commands.conf ~/.config/midi-hook/commands.conf
systemctl --user enable --now midi-hook

View its logs:

journalctl --user -u midi-hook -f

The package installs the service but never enables it automatically.

Contributors

skorotkiewicz

53 commits

Languages

Rust

97.1%

Just

1.6%

Shell

1.3%