Skip to content

Always On Top: The opacity should be able to configure the hotkey individually#46410

Merged
zateutsch merged 8 commits intomainfrom
dev/vanzue/aot-hotkey
Mar 24, 2026
Merged

Always On Top: The opacity should be able to configure the hotkey individually#46410
zateutsch merged 8 commits intomainfrom
dev/vanzue/aot-hotkey

Conversation

@vanzue
Copy link
Copy Markdown
Contributor

@vanzue vanzue commented Mar 23, 2026

Summary of the Pull Request

This pull request adds support for customizing the hotkeys used to increase and decrease the opacity of pinned windows in the Always On Top module.
Previously, these shortcuts were hardcoded to use the same modifiers as the main pin hotkey.

With these changes, users can now independently configure the increase and decrease opacity shortcuts via the settings UI, and the backend has been updated to respect and store these new settings.

Another change: If window is not Always On Topped, the opacity change take no effect, so we should not intercept, we should pass through to minimize the impact.

PR Checklist

  • Communication: I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end-user-facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

image image

Verified locally that transparency hotkey will not intercept the normal hotkey in window if Always on top not enabled

@vanzue vanzue added the 0.98.1 label Mar 23, 2026
@vanzue vanzue marked this pull request as ready for review March 23, 2026 06:01
@vanzue vanzue requested a review from Copilot March 23, 2026 06:02
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Always On Top module to allow configuring the “increase opacity” and “decrease opacity” hotkeys independently from the main pin/unpin hotkey, and adjusts centralized hotkey handling so opacity shortcuts are only intercepted when the foreground window is actually pinned.

Changes:

  • Added separate settings + UI for Increase/Decrease opacity hotkeys (new settings fields + XAML controls + dashboard display).
  • Updated Always On Top backend to load/store/register the new hotkeys and re-register on settings changes.
  • Updated centralized hotkey handling to return false (pass-through) for opacity hotkeys when the active window isn’t pinned.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs Shows three Always On Top shortcuts (activation/increase/decrease) on the dashboard.
src/settings-ui/Settings.UI/ViewModels/AlwaysOnTopViewModel.cs Adds bindable IncreaseOpacityHotkey / DecreaseOpacityHotkey settings + IPC updates.
src/settings-ui/Settings.UI/Strings/en-us/Resources.resw Adds localized header/description strings for the new hotkey cards.
src/settings-ui/Settings.UI/SettingsXAML/Views/AlwaysOnTopPage.xaml Replaces markdown shortcut descriptions with two dedicated ShortcutControl cards.
src/settings-ui/Settings.UI.Library/AlwaysOnTopSettings.cs Exposes the two new hotkeys via GetAllHotkeyAccessors().
src/settings-ui/Settings.UI.Library/AlwaysOnTopProperties.cs Adds new serialized properties + defaults for opacity hotkeys.
src/modules/alwaysontop/AlwaysOnTopModuleInterface/dllmain.cpp Parses new hotkey fields; updates centralized interception logic for opacity hotkeys.
src/modules/alwaysontop/AlwaysOnTop/SettingsConstants.h Adds new SettingId values for opacity hotkeys.
src/modules/alwaysontop/AlwaysOnTop/Settings.h Adds new HotkeyObject fields for opacity hotkeys with defaults.
src/modules/alwaysontop/AlwaysOnTop/Settings.cpp Loads new hotkey fields and emits change notifications for them.
src/modules/alwaysontop/AlwaysOnTop/AlwaysOnTop.cpp Registers the new hotkeys and re-registers when they change.

vanzue and others added 4 commits March 24, 2026 08:17
Co-authored-by: Niels Laute <niels.laute@live.nl>
….xaml

Co-authored-by: Niels Laute <niels.laute@live.nl>
….xaml

Co-authored-by: Niels Laute <niels.laute@live.nl>
Co-authored-by: Niels Laute <niels.laute@live.nl>
@vanzue vanzue requested a review from niels9001 March 24, 2026 00:37
@zateutsch zateutsch merged commit 21f06b8 into main Mar 24, 2026
15 checks passed
zateutsch added a commit that referenced this pull request Mar 25, 2026
Cherry-picked commits:
- Make KBM Editor pinnable (#46482)
- CmdPal: Fix missing primary context command for late-bound items (#46131)
- CmdPal: Ensure DockWindow property cleans up after itself (#46303)
- CmdPal: Hotfix commonCallbacks array initial count to prevent negative number (#46215)
- CmdPal: Fix missing app context menu actions on the main page (#46293)
- CmdPal: Fix dock popup XamlRoot handling on DockControl (#46305)
- CmdPal: Reduce DockWindow backdrop switching and visual artifacts (#46309)
- Always On Top: The opacity should be able to configure the hotkey individually (#46410)
- [OOBE] Ensure the Settings button on the SCOOBE page opens Home, not a blank page (#46203)
- CmdPal: Fix scroller scrolling and down glyph (#46447)
- [Settings] Decouple Settings.UI.Library from PowerDisplay.Lib to fix (#46325)
@zateutsch zateutsch added the Product-Always On Top Refers to the idea of a Always on Top Powertoy label Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.98.1 Product-Always On Top Refers to the idea of a Always on Top Powertoy

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Always on Top: Keyboard shortcut conflict on CZE keyboard

4 participants