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

Remove all keyboard shortcuts #379

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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