[Bug]: "Cmd" modifier in CustomShortcut doesn't trigger the Windows key on Windows
- Dominant language
- Rust
- Stars
- 21k
- Forks
- 675
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 180
Description
### Pre-flight checklist
- [x] I searched [existing issues](https://github.com/AprilNEA/OpenLogi/issues?q=is%3Aissue) and this is not a duplicate.
- [x] I am on the [latest release](https://github.com/AprilNEA/OpenLogi/releases/latest) or a recent `master` build.
- [x] I quit **Logi Options+** before running OpenLogi (the two apps fight over HID++ access and only one can own a receiver at a time).
### Which part of OpenLogi?
GUI (desktop app)
### OpenLogi version
7.10
### Operating system
Windows
### OS version & architecture
11
### Device model
Lift Vertical Ergonomic Mouse
### How is the device connected?
Bluetooth (direct, no receiver)
### Affected area(s)
- [ ] Device discovery / detection
- [x] Button remapping
- [ ] DPI control
- [ ] SmartShift
- [ ] Per-application profiles
- [ ] Battery status
- [x] Settings / configuration (TOML)
- [ ] Auto-update
- [ ] Menu bar / tray
- [ ] Other
### What happened?
Docs describe `CustomShortcut` as storing a "platform-neutral chord" using modifiers `shift`, `control`/`ctrl`, `option`/`alt`, `command`/`cmd`. On Windows, I'd expect `cmd` to map to the Windows key (analogous to how Electron's `CommandOrControl` works), since Win+Down is the native "minimize active window" shortcut.
In practice:
```toml
DpiToggle = { CustomShortcut = "Cmd+Down" }
```
sends only the `Down` key — the Cmd/Win modifier is silently dropped. Windows key doesn't seem to be injectable via CustomShortcut at all on Windows currently.
### Proposed solution
On Windows, map `cmd`/`command` in a `CustomShortcut` chord to a synthesized Windows-key (`VK_LWIN`) keypress, so cross-platform chords like `Cmd+Down` behave consistently on Windows.
### Steps to reproduce
Set in toml
DpiToggle = { CustomShortcut = "Cmd+Down" } or
DpiToggle = { CustomShortcut = "Win+Down" }
when button is pressed in an editor we can see that only the down button has been pressed (i.e. the page scrolls down) and not the window restored or minimized
### Diagnostics report
```markdown
```
### `openlogi list` output
```text
```
### Logs
```shell
```
### macOS permissions (if applicable)
- [ ] OpenLogi has **Accessibility** permission (needed to remap buttons via the event tap).
- [ ] OpenLogi has **Input Monitoring** permission (needed for Bluetooth-direct devices and capture).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the CustomShortcut handling for TOML settings and trace how the cmd/command and Win modifiers are interpreted on Windows. Reproduce the issue with DpiToggle = { CustomShortcut = "Cmd+Down" } and the Win variant; it is done when the Windows modifier is retained alongside Down and the native window action is triggered.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100