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

feat: adds keyboard shortcuts #1404

Merged

Conversation

pedrolamas
Copy link
Member

@pedrolamas pedrolamas commented Apr 2, 2024

Adds support for keyboard shortcuts!

Keyboard Shortcuts dialog (shown with ?)

image

image

Button tooltips (shown only if Keyboard Shortcuts are enabled)

image

image

image

Settings entry

image

@pedrolamas pedrolamas added the FR - Enhancement New feature or request label Apr 2, 2024
@pedrolamas pedrolamas added this to the 1.29.2 milestone Apr 2, 2024
@pedrolamas pedrolamas marked this pull request as draft April 2, 2024 12:44
@pedrolamas pedrolamas force-pushed the pedrolamas/keyboard-shortcuts branch 4 times, most recently from 5223968 to 55007bb Compare April 3, 2024 17:03
@pedrolamas pedrolamas force-pushed the pedrolamas/keyboard-shortcuts branch from 55007bb to d3d1378 Compare April 4, 2024 09:26
@pedrolamas pedrolamas requested a review from matmen April 4, 2024 09:28
@pedrolamas pedrolamas marked this pull request as ready for review April 4, 2024 09:28
matmen
matmen previously approved these changes Apr 4, 2024
Copy link
Member

@matmen matmen left a comment

Choose a reason for hiding this comment

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

LGTM, just one small question:

src/components/common/KeyboardShortcutsDialog.vue Outdated Show resolved Hide resolved
Replaced Ctrl+Shift+F12 with Ctrl+Alt+F12 for Emergency Stop
Adds Ctrl+Shift+P for Pause and Ctrl+Shift+C for Cancel

Signed-off-by: Pedro Lamas <[email protected]>
Signed-off-by: Pedro Lamas <[email protected]>
@matmen matmen self-requested a review April 5, 2024 12:19
@matmen
Copy link
Member

matmen commented Apr 5, 2024

Both the pause and cancel shortcuts conflict with some firefox shortcuts (new private window and element picker respectively), and while Ctrl+Shift+C seems to work fine when printing (only opens the element picker when the printer is idle), Ctrl+Shift+P always opens a new private window for me

@pedrolamas
Copy link
Member Author

I have a feeling I am opening a can of worms here... I'm going to check the keyboard shortcuts that Gmail uses and try to use those (should be safer, I guess...)

Replaced Ctrl+Shift+P with Shift+P for Pause Print
Replaced Ctrl+Shift+C with Shift+C for Cancel Print

Signed-off-by: Pedro Lamas <[email protected]>
@pedrolamas
Copy link
Member Author

I've set Pause to Shift+p and Cancel to Shift+c, seems to work fine in Chrome/Edge and Firefox...


I now got myself thinking... arrows to control the toolhead? 😁

Like Shift+arrow key and that would move the toolhead in the indicated direction by 10mm?

@matmen
Copy link
Member

matmen commented Apr 5, 2024

I've set Pause to Shift+p and Cancel to Shift+c, seems to work fine in Chrome/Edge and Firefox...

With just Shift+P and Shift+P I now can't type any upper case commands containing a C or P in the console while a print is running ;) I assume the event handler is just missing the eventTargetIsContentEditable call tho 😁

I now got myself thinking... arrows to control the toolhead? 😁

Like Shift+arrow key and that would move the toolhead in the indicated direction by 10mm?

I guess that could work - maybe it could even use the configured move distances using the number keys, but that'd be a lot of combinations to remember haha

@pedrolamas
Copy link
Member Author

With just Shift+P and Shift+P I now can't type any upper case commands containing a C or P in the console while a print is running ;) I assume the event handler is just missing the eventTargetIsContentEditable call tho 😁

Oops... fixed now! 🙂

Copy link
Member

@matmen matmen left a comment

Choose a reason for hiding this comment

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

LGTM

@pedrolamas pedrolamas merged commit 79a6bcc into fluidd-core:develop Apr 7, 2024
4 checks passed
@pedrolamas pedrolamas deleted the pedrolamas/keyboard-shortcuts branch April 7, 2024 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FR - Enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants