A macOS menu bar app for the Razer Naga V2 HyperSpeed. It remaps the 12 side buttons and the extra mouse controls, and reads or changes DPI and polling rate over the USB receiver. Fork of DParent10/NagaController.
- Adaptive macOS settings window with a restrained green accent and three sections: Pulsanti, Sensibilità, Stato
- Interactive mouse photographs with side-button highlights, a top view and a matching assignment grid for all 19 logical controls
- Actions per button: keyboard keys selected by category or recorded, with optional modifiers, multi-step key sequence, mouse action (browser back/forward, real mouse buttons 4/5, middle/left/right click, scroll), launch application, shell command, macro, profile switch, disabled, or original passthrough
- Sistema editor with 25 actions for audio, playback, brightness, screenshots, windows, spaces and macOS tools, with a preview button
- Existing text snippets remain saved and can be replaced through the Tasti editor
- Profiles with auto-save, import/export as JSON, rename/duplicate/delete
- DPI (100 to 30000 per axis) and polling rate (125/500/1000 Hz) read and written through the Razer USB protocol, with read-back verification
- Optional "driver mode" for the top DPI buttons, with journaled restore of the original mode at quit
- Menu bar popover with profile selection and remapping toggle; closing the settings window keeps the service running
- Remapping activity prevents App Nap while allowing normal system sleep
- macOS 13.0 or later. The downloadable DMG contains an Apple Silicon build; Intel Macs must build from source.
- Razer Naga V2 HyperSpeed connected through its HyperSpeed USB receiver (
1532:00b4) for DPI, polling rate and driver mode. Source builds also recognize the Bluetooth identity068e:00b5, shown by macOS as "Naga V2 HS". Bluetooth detection is verified; physical button remapping still needs on-device verification. - Xcode Command Line Tools with Swift 5.9+ to build from source
- Download
NagaController-v2.1.1.dmgfrom the latest release, or build the app bundle (see below). - Open the DMG and drag
NagaController.appto Applications. Permissions are tied to the app location, so do not move it afterwards. - The release is not notarized. On first launch right-click the app and choose Open, or run
xattr -dr com.apple.quarantine /Applications/NagaController.app. - Launch it. macOS prompts for two permissions; both are required:
- Accessibility (System Settings > Privacy & Security > Accessibility)
- Input Monitoring (System Settings > Privacy & Security > Input Monitoring)
- Open the settings window from the menu bar icon, turn on "Rimappatura", and assign actions.
The Stato section shows the current permission state, the detected device, and the last input seen. If a permission was granted after launch, macOS may require restarting the app.
Button assignments are saved on the Mac, not to the mouse's onboard memory. The same selected profile is used for USB receiver and Bluetooth connections. NagaController must keep running in the menu bar to apply it; closing the settings window is fine, quitting the app stops remapping.
Select a mouse button, choose Sistema in the Azione menu, then pick a category and function. The selection saves immediately. Prova executes the selected function without pressing the mouse button.
| Category | Functions |
|---|---|
| Audio | Volume up, volume down, mute toggle |
| Riproduzione | Play/pause, previous track, next track |
| Luminosità | Display brightness up/down |
| Screenshot | Full screen or selection to a file or clipboard, screenshot and recording tools |
| Finestre e spazi | Mission Control, app windows, desktop, previous/next space, hide app, switch to the last app |
| Strumenti | Spotlight, Finder, System Settings, Notification Center, Do Not Disturb |
Each physical press runs the action once, with no hold repeat. Existing audio mappings appear under Sistema without being rewritten. Shell commands remain a separate action type.
Screenshots, Mission Control and space navigation use the keyboard shortcuts configured in macOS. Disabled or unassigned shortcuts show setup instructions instead of sending a different key combination. Do Not Disturb requires an enabled shortcut in System Settings > Keyboard > Keyboard Shortcuts > Mission Control. NagaController does not change these preferences. Spotlight opens directly even when its keyboard shortcut is disabled.
Brightness uses the Mac's brightness keys, so an external monitor must support brightness control through macOS. Media controls target the active playback app. Focus settings may sync Do Not Disturb to other Apple devices.
bash Scripts/build_app.sh # release bundle, signed with the dev identity if available
open NagaController.appWithout a signing identity the bundle is ad-hoc signed and macOS forgets its permissions on every rebuild. For development, create a local self-signed identity once:
bash Scripts/make_dev_certificate.sh # creates "NagaController Dev" in the login keychainbuild_app.sh picks it up automatically. Set SIGNING_IDENTITY="Developer ID Application: ..." to use a real identity instead. Builds are not notarized.
To produce the distributable disk image (ad-hoc signed, with an Applications shortcut):
bash Scripts/make_dmg.sh # writes NagaController-v<version>.dmgbash Scripts/test.sh # dependency-free checks, no XCTest neededRead-only hardware diagnostics (requires Input Monitoring for the launching process):
open NagaController.app --args --diagnose-file /tmp/naga.json
cat /tmp/naga.jsonAdd --verify-hardware to also write back the current DPI and polling values and confirm the read-back. Values are not changed.
Capture the UI without starting the input or hardware services:
open -n NagaController.app --args --snapshot /tmp/ui.png --snapshot-appearance dark --snapshot-size 980x700 --snapshot-button 8Appearance, size and selected button are optional snapshot controls. See the verification record for tested flows and remaining device checks.
HIDListenerobserves vendor1532devices whose product ID is00b4or whose name contains "naga", plus the exact Bluetooth identity068e:00b5, on a background run loop. It does not enumerate other products under the Bluetooth vendor ID.- Each physical press/release is recorded with its timestamp.
EventTapManagerconsumes a matching system event only if it arrives within 25 ms of a recorded HID edge, so regular keyboards are never blocked. - Synthetic events are tagged through
eventSourceUserDataand ignored by the tap. - Held buttons are released on stop, disconnect, profile change, or when the tap is disabled by the system.
- Buttons 13 to 16 (DPI, wheel tilt) rely on documented driver-mode reports and are only reported when a matching report is observed.
Sources/NagaController/ButtonMapping/action model, event synthesis, layout-aware browser shortcutsSources/NagaController/EventTap/CGEvent tap and correlation with HID inputSources/NagaController/HID/IOHID listener and pure report decodingSources/NagaController/Hardware/Razer USB protocol codec, IOHID feature-report transport, device controllerSources/NagaController/UI/SwiftUI settings window and menu bar popoverSources/NagaController/Utils/profiles storage, permissions, battery monitorTests/dependency-free test sources run byScripts/test.shResources/Info.plist, bundled default profiles and transparent mouse imagesResources/Mouse/README.mdimage sources, generation prompts and transparency verification
Protocol facts come from the published OpenRazer sources and pull request 2850; no GPL code is included. Code is licensed under MIT, see LICENSE. Mouse image provenance is documented in Resources/Mouse/README.md.