Skip to content

Conversation

@jarlef
Copy link

@jarlef jarlef commented Nov 6, 2023

Add the ability to remove all default registered keyboard shortcuts

@jarlef jarlef force-pushed the jarlef/remove-all-keyboard-shortcuts branch 2 times, most recently from b5a0899 to 9b8d746 Compare November 6, 2023 10:29
@jarlef jarlef force-pushed the jarlef/remove-all-keyboard-shortcuts branch from 9b8d746 to f6add71 Compare November 6, 2023 12:25
private readonly Dictionary<string, Func<Diagram, ValueTask>> _shortcuts;
public record KeyboardShortcut(string Key, bool Ctrl, bool Shift, bool Alt, Func<Diagram, ValueTask> Action);

private readonly Dictionary<string, KeyboardShortcut> _shortcuts;
Copy link
Collaborator

Choose a reason for hiding this comment

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

If we're going to use a record, wouldn't it be better now to just have a list/set of the shortcuts and change the equality check to test for Key+Ctrl+Shift+Alt ?

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.

2 participants