Skip to content

Add Windows support and Korean localization#93

Open
sioaeko wants to merge 5 commits into
AprilNEA:masterfrom
sioaeko:windows-support-ko
Open

Add Windows support and Korean localization#93
sioaeko wants to merge 5 commits into
AprilNEA:masterfrom
sioaeko:windows-support-ko

Conversation

@sioaeko
Copy link
Copy Markdown

@sioaeko sioaeko commented Jun 2, 2026

Description

This adds a first Windows version of OpenLogi. The goal is to make the app usable on Windows without needing Logi Options+ running in the background.

The Windows path now discovers Logitech HID++ devices through the Windows HID API, supports the main GUI flow, installs a Windows mouse hook for button remapping, and adds Windows-specific pairing and startup handling. I also added Korean translations and fixed a few layout issues that showed up while testing the app in Korean, including the settings language row layout.

I tested this with an MX Master 4 connected through a Logi Bolt receiver after stopping the Logi Options+ agent.

Screenshots

English:

OpenLogi Windows main

OpenLogi Windows settings

Korean:

OpenLogi Windows main Korean

OpenLogi Windows settings Korean

What changed

  • Added Windows HID++ device discovery and transport support
  • Added Windows mouse hook support for button remapping
  • Added DPI and SmartShift support on Windows
  • Added Windows Bluetooth pairing support through the Windows pairing API
  • Added Windows startup-at-login handling
  • Added Korean language support
  • Added a Windows executable icon using the existing OpenLogi icon asset
  • Fixed several Windows/Korean UI layout issues in the main window and settings window
  • Avoid selecting receiver slots that claim to be online but do not actually respond to HID++ probes

Tested

Tested on Windows with an MX Master 4 connected through a Logi Bolt receiver, with the Logi Options+ agent stopped.

  • openlogi list detects the mouse and reads model/battery info
  • openlogi diag features dumps the HID++ feature table
  • openlogi diag dpi reads, writes, reads back, and restores DPI
  • openlogi diag smartshift toggles SmartShift and restores the previous mode
  • cargo fmt --all
  • cargo test -p openlogi-cli -p openlogi-hid -p openlogi-core
  • cargo clippy -p openlogi-cli -p openlogi-hid -p openlogi-core --all-targets -- -D warnings
  • cargo build -p openlogi --release
  • cargo build -p openlogi-gui --release

There is still more hardware coverage needed across other Logitech models, Unifying receivers, and direct Bluetooth devices, but the core Windows path is working on real hardware now.

Copy link
Copy Markdown
Contributor

@pullfrog pullfrog Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ℹ️ No critical issues — minor suggestions inline.

Reviewed changes — a substantial first cut at Windows support (HID transport, mouse hook, Bluetooth pairing, startup handling, input synthesis) with a full Korean localization and CJK-aware layout fixes. 42 files changed across every major subsystem.

  • Windows HID++ transport — new WindowsHidppChannel composites short+long collections; NativeHidWriter provides a Win32 fallback when async-hid writes fail
  • Windows mouse hookWH_MOUSE_LL implementation in openlogi-hook/src/windows.rs with foreground process path query
  • Windows Bluetooth pairing — WinRT-based BLE enumeration and pairing via DeviceWatcher/PairAsync
  • Windows input synthesisSendInput-based helpers in openlogi-core/src/binding.rs with macOS→Windows VK code mapping
  • Windows startup-at-loginreg.exe-based Run registry key management
  • Device enumeration fix — receiver slots that claim online but don't respond to HID++ probes are now marked offline
  • Korean localization — full ko column in locales/app.yml, locale detection, and test assertions
  • CJK layout fixes — wider panels, line_height on text, vertical language row, centered accessibility footer, platform-aware launch descriptions
  • cfg migration — all #[cfg(not(target_os = "macos"))] stubs updated to #[cfg(not(any(target_os = "macos", target_os = "windows")))]

Note: 1 inline comment(s) dropped because they did not anchor to lines inside the PR diff:

  • crates/openlogi-hook/src/tests.rs:56 (RIGHT) — line 56 (RIGHT) is not inside a diff hunk

Pullfrog  | Fix all ➔Fix 👍s ➔View workflow run | Using Big Pickle (free) (credentials for Anthropic not configured) | 𝕏

Comment thread crates/openlogi-hid/src/transport.rs Outdated
@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog Bot commented Jun 2, 2026

Pullfrog stalled

The agent stopped emitting events for 302s and was killed by the activity-timeout watchdog. 45507 events were processed before the failure.

Recent agent stderr
Performing one time database migration, may take a few minutes...
sqlite-migration:done
Database migration complete.

Pullfrog  | Rerun failed job ➔View workflow run | via Pullfrog | Using Big Pickle (free) (credentials for Anthropic not configured) | 𝕏

@pullfrog
Copy link
Copy Markdown
Contributor

pullfrog Bot commented Jun 2, 2026

Pullfrog stalled

The agent stopped emitting events for 305s and was killed by the activity-timeout watchdog. 1834 events were processed before the failure.

Recent agent stderr
Performing one time database migration, may take a few minutes...
sqlite-migration:done
Database migration complete.

Pullfrog  | Rerun failed job ➔View workflow run | via Pullfrog | Using Big Pickle (free) (credentials for Anthropic not configured) | 𝕏

@recchia recchia mentioned this pull request Jun 2, 2026
10 tasks
@AprilNEA AprilNEA force-pushed the windows-support-ko branch from 230257f to c73e9ee Compare June 5, 2026 13:43
@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented Jun 5, 2026

Greptile Summary

This PR adds Windows platform support to OpenLogi, including HID++ device discovery via native Win32 HID APIs, a WH_MOUSE_LL mouse hook for button remapping, Windows Bluetooth pairing through the WinRT device enumeration API, SendInput-based action synthesis, registry-based launch-at-login, and Korean (ko) localization. All previously-flagged issues have been resolved in this revision.

Confidence Score: 5/5

The Windows platform layer is well-structured and all previously-identified concerns have been correctly resolved in this revision.

Every formerly-flagged issue has been addressed: injected synthetic events are now filtered via LLMHF_INJECTED preventing hook re-entrancy, WinRT apartment initialization is balanced by a WinrtApartment RAII drop guard, NTSTATUS codes are formatted as raw hex integers, the Windows Bluetooth button is gated behind cfg!(target_os = "windows"), and error detail in the add-device window now pattern-matches on enum variants directly. The new SendInput dispatch, NativeHidWriter write-method fallback chain, and registry-based launch-at-login all follow correct Win32 idioms. No logic errors or resource leaks were identified.

No files require special attention.

Important Files Changed

Filename Overview
crates/openlogi-hook/src/windows.rs New WH_MOUSE_LL hook implementation; correctly filters injected events with LLMHF_INJECTED and uses RAII + UnhookWindowsHookEx to clean up; message-loop and callback lifecycle look sound.
crates/openlogi-hid/src/windows_pairing.rs WinRT Bluetooth pairing; WinrtApartment RAII guard correctly balances RoInitialize/RoUninitialize on each blocking call; device watcher lifecycle and token cleanup look correct.
crates/openlogi-hid/src/windows_hid.rs Native HID report writer via CreateFileW; tries three access levels and multiple write APIs; HidHandle/PreparsedData RAII guards prevent handle/data leaks; NTSTATUS formatted as hex integer correctly.
crates/openlogi-gui/src/platform/launch_agent.rs Windows startup-at-login via reg.exe; args passed as array (no shell injection); delete-nonexistent silently debugs; best-effort semantics match macOS path.
crates/openlogi-gui/src/windows/add_device.rs Windows Bluetooth button is now correctly guarded with cfg!(target_os = "windows"); windows_pairing_error_detail matches enum variants directly instead of parsing Display strings.
crates/openlogi-core/src/binding.rs Windows action dispatch via SendInput; exhaustive match on Action variants; mac_virtual_key_to_windows warns and drops on unmapped keys; modifier dedup logic for Cmd+Ctrl is handled.
crates/openlogi-hid/src/transport.rs Windows path opens a NativeHidWriter alongside async-hid for report writes; is_long_only_collection correctly suppressed with allow(dead_code) on Windows where the Windows path bypasses it.
crates/openlogi-gui/src/watchers/pairing.rs New Windows pairing session path; correct event-driven state machine; 120s idle deadline; stray controls handled correctly in both receiver and Windows sessions.

Reviews (4): Last reviewed commit: "fix: ignore injected Windows mouse event..." | Re-trigger Greptile

Comment thread crates/openlogi-gui/src/windows/add_device.rs
Comment thread crates/openlogi-hid/src/windows_pairing.rs
Comment thread crates/openlogi-gui/src/windows/add_device.rs
Comment thread crates/openlogi-hid/src/windows_hid.rs
@sioaeko sioaeko force-pushed the windows-support-ko branch from c73e9ee to b13cac6 Compare June 5, 2026 14:07
Comment thread crates/openlogi-hook/src/windows.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant