clash.verge.preferences.configure_hotkeys
Configure global hotkeys for Clash Verge functions like toggling system proxy or changing clash mode. Preview changes first, then confirm with a nonce to apply.
Instructions
v1.1-C: Modify Clash Verge hotkey mapping. Strong confirmation required (nonce-bound). First call (confirm=false) returns a preview with a nonce; second call (confirm=true with nonce) applies the change. Function names must be in the allowlist (open_or_close_dashboard, clash_mode_rule, clash_mode_global, clash_mode_direct, toggle_system_proxy, toggle_tun_mode, entry_lightweight_mode, reactivate_profiles). Accelerators must match Tauri syntax. System-reserved combos and duplicates are rejected. Requires settings.verge-hotkeys-write capability.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nonce | No | Nonce from preview mode. Required when confirm=true. | |
| confirm | No | Set to true to apply. Default: false (preview mode, returns nonce). | |
| mapping | Yes | Function name to accelerator mapping. e.g. {"open_or_close_dashboard": "CommandOrControl+Shift+V"}. | |
| ownerFingerprint | No | Owner fingerprint from a previous inspect or write call. | |
| enableGlobalHotkey | Yes | Whether to enable global hotkey registration. |