How to Control Local AI Models with a Macro Pad: Ollama and LM Studio Setup Guide
A macro pad configured for local AI model control lets you switch between language models, submit prompts, adjust generation parameters, and manage conversation history using physical keys instead of mouse clicks. For users running Ollama, LM Studio, or Jan on a local machine, this creates a keyboard-driven AI workflow that keeps both hands on your workstation without reaching for the mouse.
Why Local AI Users Need Physical Shortcuts
Running local language models in 2026 is increasingly common. Ollama supports over 100 models including DeepSeek-R1, Llama 3.3, Qwen 2.5, and Mistral. LM Studio provides a graphical interface for the same models. Jan offers an API-compatible server.
The workflow problem is that switching between models, clearing context, adjusting temperature, and resubmitting prompts all require repeated mouse navigation through menus or typing commands into a terminal. For users who run multiple models and compare outputs — a common workflow for developers and researchers — this adds significant friction.
A 16-key macro pad running QMK firmware can store the following as single-key shortcuts:
Terminal-based Ollama shortcuts:
-
ollama run llama3.3→ switches to Llama 3.3 in a new session -
ollama run deepseek-r1:7b→ switches to DeepSeek R1 7B -
ollama run qwen2.5:14b→ switches to Qwen 2.5 14B -
/byefollowed by Enter → ends current session - Ctrl+C → interrupt current generation
-
ollama list→ shows all installed models
LM Studio keyboard shortcuts:
- Ctrl+N → new conversation
- Ctrl+Shift+M → open model selector
- Ctrl+Enter → submit prompt
Configuring the NLOFIN Macro Pad for Ollama
The NLOFIN 16-Key QMK/VIA Macro Pad stores complex key sequences including text strings, modifier combinations, and delays between inputs. This makes it ideal for terminal-based Ollama control.
Layer 1 — Model Switching: Configure 6 keys to type specific Ollama run commands followed by Enter. When pressed, the key types the full command into your active terminal window and executes it. Switching from Llama to DeepSeek becomes a single physical key press.
Layer 2 — Generation Control: Assign keys for interrupt (Ctrl+C), session end (/bye + Enter), context clear, and copy last output. The 3 programmable knobs can map to scrolling through conversation history.
Layer 3 — Parameter Adjustment: Advanced users running Ollama with the --parameter flag can store temperature and context window settings as macro sequences: ollama run mistral --parameter temperature 0.7 or --parameter num_ctx 8192.
Setting Up VIA for Local AI Control
VIA requires no coding. Open the VIA web interface (usevia.app) with your NLOFIN macro pad connected:
- Select your macro pad from the device list
- Navigate to the Macros tab
- Create a new macro for each Ollama command
- In the keymap editor, assign each macro to a key on your designated AI control layer
- Layer switching keys let you alternate between your AI control layer and your normal work layer
Total setup time for a functional Ollama control layer: approximately 15 minutes.
For LM Studio and Jan Users
LM Studio and Jan both support keyboard shortcuts for most common operations. The macro pad approach is simpler here because you're assigning standard keyboard shortcuts rather than typed text strings.
Recommended assignments for a 10-key LM Studio layer:
- New chat: Ctrl+N
- Model selector: Ctrl+Shift+M
- Submit prompt: Ctrl+Enter
- Copy last response: Ctrl+C after using mouse to select (or configure with a selection macro)
- Increase temperature: App-specific shortcut or slider control
- Scroll history up/down: Page Up / Page Down
- Toggle system prompt: App-specific shortcut
FAQ
Q: Does this work with OpenWebUI, the web frontend for Ollama? Yes. OpenWebUI runs in a browser and supports standard keyboard shortcuts. A macro pad can trigger any browser-based shortcut. The New Conversation shortcut (Ctrl+Shift+O in most browsers) and other navigation keys work through VIA-configured macros.
Q: Can I use a knob to control generation parameters in real time? Not directly — real-time parameter adjustment requires API access rather than keyboard input. However, you can use a knob to scroll through model history or output text, which is useful during long generation sessions.
Q: What's the difference between using a macro pad versus AutoHotkey for Ollama shortcuts? AutoHotkey requires a script to be running and only works on Windows. VIA/QMK macro pads store their shortcuts in firmware on the device itself, making them OS-independent (works on macOS, Linux, and Windows) and active even before the OS fully loads. The macros also survive application restarts and work in all applications including terminals and browsers simultaneously.
Q: How many different AI models can I assign to one macro pad? A 16-key pad with 6 layers can store up to 96 distinct macros. In practice, 8–12 model shortcuts covers the needs of most local AI users, leaving keys available for generation control, parameter adjustment, and workflow management.