Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Windows key (winkey) in keyboard shortcuts #418

Closed
tfiers opened this issue Feb 8, 2022 · 9 comments
Closed

Allow Windows key (winkey) in keyboard shortcuts #418

tfiers opened this issue Feb 8, 2022 · 9 comments
Labels
enhancement New feature or request

Comments

@tfiers
Copy link

tfiers commented Feb 8, 2022

Describe the enhancement or feature you'd like

Allow Windows key (winkey) in keyboard shortcuts

Describe alternatives you've considered

A shortcut without the winkey (eg ctrl-shift-alt-L or -D, for Light/Dark).
Thing is, lotsa shortcuts are already used, in vscode eg.
Plus, semantically, "Windows" works well as switching color mode is an OS wide setting.

Additional context

Currently, pressing a key combination in the shortcut input boxes in the settings dialog drops the Win key if it is present in the combination. The other modifiers are retained.

Btw, a thousand thanks for this well made app.

@tfiers tfiers added the enhancement New feature or request label Feb 8, 2022
@tfiers
Copy link
Author

tfiers commented Feb 8, 2022

btw, a "toggle" command would be nice, so only one shortcut key is needed.
See the second part of this comment: #5 (comment)

@Spiritreader
Copy link
Member

Spiritreader commented Feb 8, 2022

btw, a "toggle" command would be nice, so only one shortcut key is needed.

Toggling is not possible because of how AutoDarkMode works.
The switching logic runs a timer that applies dark and light switching operations at the appropriate point in time.
The "force light" and "force dark" options set the theme to light or dark respectively, and then disable the switching logic while still keeping it running.

The only way to make this work is to enable toggling hotkeys if automatic theme switching is disabled, but there's so much feature creep in the app already.

What is on the radar would be something like "force theme until next sunrise/sunset", but no details on this yet.


We can't allow the Windows hotkey, as per default with the library we use, it isn't defined as a modifier key.
I have attempted to make it work with the library, but found it to be infeasible.

Thanks for you suggestions nonetheless!

@tfiers
Copy link
Author

tfiers commented Feb 8, 2022

All clear, thanks for the prompt response and you folks' work!

@tfiers
Copy link
Author

tfiers commented Feb 8, 2022

I see indeed that a pure toggle is not compatible with time-based switching.

When Time is Disabled however, a pure toggle does make sense I'd say.

@Spiritreader
Copy link
Member

Spiritreader commented Feb 15, 2022

Problem with existing idea

The swapping logic is still available in the program, but it would require more work to actually re-implement it in the UI.

  • Add another toggle hotkey to the config
  • Show/Hide different hotkey configurations depending on what mode is selected (when time switching is disable, the switch page should show the toggle hotkey, otherwise it shows the force hotkeys)
  • Add an option to toggle the themes using the context menu (must update whenever the mode is switched)

The most important thing is that if this gets implemented, there is zero confusion about what the toggle hotkey does.
It must always be clear that it only works when time based switching is disabled.

The usability of the feature must be guaranteed beyond its correct functionality.

Proposal for new idea

That being said, it would maybe make sense to include a hotkey that allows to toggle AutoThemeSwitching.
We could show a toast notification to inform the user about this.
Once this is done, it would be quite easy to implement a "theme switching" toggle, because we could just automatically disable the time based switching and have the user turn it on again with another hotkey if they desire so.
That would also avoid complex showing and hiding of options depending on the selected configuration.

That way, it would probably avoid lots of confusion while also allowing more functionality.

@tfiers
Copy link
Author

tfiers commented Feb 15, 2022

That sounds excellent!

@tooomm
Copy link
Contributor

tooomm commented Apr 14, 2022

What is on the radar would be something like "force theme until next sunrise/sunset", but no details on this yet.

That's requested in #439 btw 👍

@Spiritreader
Copy link
Member

Spiritreader commented Apr 25, 2022

I've made progress on this, you should now be able to set WinKeys in the UI as hotkeys. (available in latest beta)

@Spiritreader
Copy link
Member

Spiritreader commented Jun 13, 2022

No updates in a while, seems like the win hotkey is now working as intended. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants