I'm exploring the possibility of using a programmable keybord like this one:


enter image description here

to expand and simplify my keyboard shortcuts.

Now I'm wondering if there is the possibility to use a musical MIDI keyboard instead? E.g. like this one:


enter image description here

This solution would be much cheaper and, in my opinion, "smarter".

Anyone have news of such a project?

  • You would need to check what keycodes your OS receives when you press keys on the MIDI keyboard. If you're on Linux, you can use xev to do so.
    – Dan
    Feb 20, 2020 at 20:15
  • I'm on Linux. Thanks!
    – Gabriele
    Feb 20, 2020 at 20:18
  • 5
    there is a package on ELPA, elpa.gnu.org/packages/midi-kbd.html This allows you to use a MIDI device for input to Emacs. It turns key presses on the MIDI device into key-events which you must bind to commands. I have not used this so do not know what it really does for you. By the way, once you have set up your MIDI keyboard using midi-kbd you can check the key-events it has assigned to key presses on the MIDI keyboard by typing "C-h k" and then pressing the key you are interested in on the MIDI keyboard. Feb 20, 2020 at 20:50
  • 1
    [maybe OT] some tried to connect multiple keyboards and change the keymap of one of the them superuser.com/a/787910/203364 Feb 21, 2020 at 7:50
  • Kind of OT, but I guess it's a consequence of the question. OTOH, it would be good to make your answer a bit more complete, e.g. pointing to setxkbdmap and -device to make the answer useful even without folling the link.
    – Stefan
    Feb 21, 2020 at 13:37

1 Answer 1


I'd suggest not using a midi keyboard, but instead, using any keyboard which is capable of running QMK firmware.

This has the following advantages:

  • It can work in any application and doesn't rely on configuring your operating system/software for non-standard input devices (from the perspective of using it for keyboard shortcuts at least).
  • You can enable modifier keys to switch layers.
  • You can configure keys to run multiple keystrokes (including typing in text).
  • It can record/playback macros.

You could use the plank keyboard or lets-split as a large num-pad, programming F-Keys 13..24, as well as other available keys.

For example, you could bind each key to a Hyper-[A-Z] combination, assuming you're not already using the Hyper modifier elsewhere.

See qmk/keyboards for a full list of supported keyboards.

  • Interesting but not cheap at all. ;-)
    – Gabriele
    Feb 21, 2020 at 23:37
  • QMK supports loads of keyboards: falba.tech have cheaper options (stand alone numpad's and lets-split may be viable alternatives).
    – ideasman42
    Feb 21, 2020 at 23:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.