Skip to content

Conversation

@Yusyuriv
Copy link
Member

@Yusyuriv Yusyuriv commented Apr 24, 2024

What's the PR

Now that users have the ability to customize many hotkeys in Flow Launcher, we should prevent them from accidentally using the same hotkey for multiple actions.

Todo

  • Handle static hotkeys that the user can't change
  • Handle editable hotkeys
  • Detailed warning messages: why the hotkey can't be changed, what's already using the same hotkey
  • Figure out how to do hotkey name localization in Flow.Launcher.Infrastructure.UserSettings.Settings

Things to consider

  • Maybe offer the ability to remove the other hotkey directly from the hotkey change dialog?
    Done.

@onesounds onesounds added the kind/ux related to user experience label Apr 24, 2024
@Yusyuriv Yusyuriv requested review from onesounds and taooceros April 26, 2024 05:49
@Yusyuriv Yusyuriv marked this pull request as ready for review April 26, 2024 05:49
@Yusyuriv Yusyuriv changed the title Start working on handling duplicate hotkeys Handle duplicate hotkeys in HotkeyControlDialog Apr 26, 2024
@onesounds
Copy link
Contributor

Functionally perfect. If taooceros checks the code and there's nothing wrong, let's merge. Thank you for your hard work

@onesounds onesounds merged commit 1596c59 into dev Apr 27, 2024
@onesounds onesounds deleted the duplicate-hotkey-handling branch April 27, 2024 01:20
/// An action that, when called, will unregister this hotkey. If it's <c>null</c>, it's assumed that this hotkey
/// can't be unregistered, and the "Overwrite" option will not appear in the hotkey dialog.
/// </param>
public RegisteredHotkeyData(
Copy link
Member

Choose a reason for hiding this comment

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

maybe you can use variable argument?

new($"{OpenResultModifiers}+D0", "HotkeyOpenResultN", 10)
};

if(!string.IsNullOrEmpty(Hotkey))
Copy link
Member

Choose a reason for hiding this comment

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

oh my god this seems terrible lol. I don't know whether there are better way to handle this....

Copy link
Member

Choose a reason for hiding this comment

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

maybe at least split it to another function.

@VictoriousRaptor VictoriousRaptor added this to the 1.19.0 milestone May 1, 2024
@jjw24 jjw24 added the enhancement New feature or request label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request kind/ux related to user experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants