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.