agent: wayland — evdev hotkey backend, download resume, SHA256 integrity
Add kon-hotkey crate with evdev-based global hotkey capture that works on Wayland (and X11). Patterns from whisper-overlay: per-device async listeners, inotify hotplug with udev permission retry, watch channel for live config updates. Frontend detects Wayland at startup and selects evdev or tauri-plugin-global-shortcut automatically. Model downloads now support HTTP Range resume for interrupted downloads and optional SHA256 integrity verification (incremental, no second pass). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
32
crates/hotkey/src/stub.rs
Normal file
32
crates/hotkey/src/stub.rs
Normal file
@@ -0,0 +1,32 @@
|
||||
//! No-op stub for non-Linux platforms.
|
||||
//!
|
||||
//! On macOS and Windows, Tauri's global-shortcut plugin handles hotkeys
|
||||
//! natively. This stub exists so the crate compiles on all platforms.
|
||||
|
||||
use tokio::sync::mpsc;
|
||||
|
||||
use crate::HotkeyCombo;
|
||||
|
||||
/// Events emitted by the hotkey listener.
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum HotkeyEvent {
|
||||
Pressed,
|
||||
Released,
|
||||
}
|
||||
|
||||
/// Stub listener that does nothing on non-Linux platforms.
|
||||
pub struct EvdevHotkeyListener;
|
||||
|
||||
impl EvdevHotkeyListener {
|
||||
pub fn start(
|
||||
_combo: HotkeyCombo,
|
||||
_event_tx: mpsc::Sender<HotkeyEvent>,
|
||||
) -> Self {
|
||||
log::info!("evdev hotkey listener is a no-op on this platform");
|
||||
Self
|
||||
}
|
||||
|
||||
pub fn set_hotkey(&self, _combo: HotkeyCombo) {}
|
||||
|
||||
pub async fn stop(&self) {}
|
||||
}
|
||||
Reference in New Issue
Block a user