config-2014-naga
A Linux utility written in Rust to remap all 12 side buttons on the Razer Naga 2014 mouse to configurable keyboard and numpad keys.
Features
- Maps all 12 Naga side buttons to any keyboard key
- Configurable via TOML files
- Default mapping to number row (1-0, minus, equal)
- Debug mode for troubleshooting
Install
crates.io
# run with default key mapping
# specifiy key mapping with ./config/config-2014-naga.toml
From Source
# build with verbos debug output
Default Mapping
Run with the default key mapping (buttons 1-12 → keys 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, -, =):
Custom Mapping
Create a TOML configuration file:
# config.toml
[]
= "F1"
= "F2"
= "F3"
= "F4"
= "F5"
= "F6"
= "LeftShift"
= "LeftControl"
= "LeftAlt"
= "Space"
= "KP::_1"
= "KP::_2"
Permissions
The program needs root access to:
- Read from
/dev/inputdevices - Create virtual keyboard via
/dev/uinput
Documentation
Generate and view the API documentation:
How It Works
- Scans
/dev/inputfor "Razer Razer Naga 2014" device with physical path ending in "/input2" - Grabs exclusive access to the device (prevents default behavior)
- Creates a virtual keyboard device via uinput
- Reads events from the Naga side buttons
- Maps button events to configured keys
- Sends mapped key events to the virtual keyboard
Troubleshooting
Device not found
Make sure your Razer Naga 2014 is plugged in:
|
Permission denied
Run with sudo or add your user to the input group:
# Log out and back in
Keys not working
Run in debug mode to see what's happening:
Press the side buttons and watch the output.
Project Origin & Credits
This project is derived from earlier work in the community:
Original project by jpodeszwik:
Extended fork with numpad support by industrylol:
This repository represents an independently maintained continuation with significant modifications, cleanup, and ongoing support.