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

Keyboard service ⌨️ #136

Merged
merged 4 commits into from
Nov 30, 2023
Merged

Keyboard service ⌨️ #136

merged 4 commits into from
Nov 30, 2023

Conversation

MusicFreak456
Copy link
Collaborator

@MusicFreak456 MusicFreak456 commented Nov 28, 2023

Shortcuts added as a pilot:
Ctrl + z -> undo
Ctrl + shift + Z -> redo
Ctrl + y -> redo
Delete -> erase selected shapes

@MusicFreak456 MusicFreak456 added the feature New feature or request label Nov 28, 2023
@MusicFreak456 MusicFreak456 self-assigned this Nov 28, 2023
@MusicFreak456 MusicFreak456 linked an issue Nov 28, 2023 that may be closed by this pull request
@ventus550
Copy link
Collaborator

ventus550 commented Nov 30, 2023

Seems to work. Please consider adding ctrl + shift + z as an alternative shortcut for redo :)

@MusicFreak456
Copy link
Collaborator Author

Seems to work. Please consider adding ctrl + shift + z as an alternative shortcut for redo :)

Alternative shortcut added

@@ -10,6 +10,9 @@ class HistoryService {
constructor() {
const canvasKeyboard = KeyboardService.get('canvas')
canvasKeyboard.registerCallback(['Control', 'z'], () => this.undo())
canvasKeyboard.registerCallback(['Control', 'Shift', 'Z'], () =>
Copy link
Collaborator

Choose a reason for hiding this comment

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

The z key is now, probably by mistake, in uppercase.

@MusicFreak456 MusicFreak456 merged commit 7cedb21 into main Nov 30, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Keyboard interceptor ⌨️
2 participants