mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-28 13:02:21 +01:00
* feat: Windows beta with streaming dictation, Hold/Toggle shortcut mode, and release pipeline Ports the windows-shell branch onto main, adds a GPU streaming finish for Parakeet Unified English with a whole-clip fallback, a cross-platform Hold/Toggle shortcut mode, x64 and ARM64 Windows CI and release feeds, and the website Windows download. * copy: Enabled/Disabled status on Linux and in the shared Activity labels * ci: install SPIRV-Headers for the x64 Vulkan build and gate the Windows-only device query * refactor: one implementation per concept across macOS, Linux, and Windows The Windows port carried its own copies of modules main already has. Each concept now has one implementation: - UI: Windows uses main's design system (design_tokens, desktop_ui, text_input, desktop_transcription_picker types) instead of a Fluent copy. Windows-only bits are small cfg additions: Segoe Fluent Icons for Icon, Windows text-editing key bindings, fixed-height and read-only text inputs, and the shared slider_track component. windows_ui keeps the window chrome and the anchored dropdowns, now drawn with menu/menu_item. - Windows chrome: the sidebar runs the full window height as on macOS. The caption row is split: the brand sits over the sidebar, the window buttons over the content, and both halves stay OS drag regions. - Commands: Windows uses main's commands, command_grammar, context, keys, and personal_commands. The SDK provisioner accepts the embedded TypeScript src layout; Windows execute() opens URLs and paths with ShellExecuteW. - OpenCode: dictation_processor is the one client and ordered policy (corrections, rewrite, transformations) on macOS and Windows. Windows keeps its opencode2 api CLI transport in a cfg'd submodule; the ranked catalog, prompts, Voice Action generation, and the transformation stage are shared. - desktop_activity is shared; the Windows Settings contract is windows_desktop_host, without #[path] aliases. - self_update is the signed-feed core for both the Linux and Windows updaters. - Windows copy follows the design system: sentence case and "Hex". * chore(windows): flat app icon that stays crisp at taskbar sizes * chore: mark the Windows-only screens to consolidate with app_window after #138 * fix(linux): wait for partial X11 grabs to be released before reporting a conflict
37 lines
992 B
Rust
37 lines
992 B
Rust
//! Platform-neutral key and modifier types for the command taxonomy.
|
|
//! Actions describe keystrokes with these; `keyboard` maps them to
|
|
//! CoreGraphics on macOS. `COMMAND` is the platform primary shortcut
|
|
//! modifier (Command on macOS, Control elsewhere); `OPTION` is Option/Alt.
|
|
|
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
pub enum Key {
|
|
Character(char),
|
|
Home,
|
|
End,
|
|
Up,
|
|
Down,
|
|
Left,
|
|
Right,
|
|
Enter,
|
|
Escape,
|
|
}
|
|
|
|
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
|
pub struct Modifiers(u8);
|
|
|
|
impl Modifiers {
|
|
pub const NONE: Self = Self(0);
|
|
pub const COMMAND: Self = Self(1 << 0);
|
|
pub const SHIFT: Self = Self(1 << 1);
|
|
pub const OPTION: Self = Self(1 << 2);
|
|
pub const CONTROL: Self = Self(1 << 3);
|
|
|
|
pub const fn with(self, other: Self) -> Self {
|
|
Self(self.0 | other.0)
|
|
}
|
|
|
|
#[cfg_attr(not(target_os = "macos"), allow(dead_code))]
|
|
pub(crate) fn contains(self, other: Self) -> bool {
|
|
self.0 & other.0 != 0
|
|
}
|
|
}
|