Conversation
@xla can you test if this works on linux? Should work with the |
I wonder if there's a nice way to signal the user that keyboard shortcuts are available in the app? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dope 🚀
@rudolfs I was wondering about that as well. Maybe we can put it in the settings in some way. @brandonhaslegs what do you think? |
Hm, maybe we can stick them in the tooltips and get rid of the help screen? |
@rudolfs @brandonhaslegs what would be the icon for |
I don't think it has an icon, it should be just "Ctrl": https://en.wikipedia.org/wiki/Control_key. |
@rudolfs yeah but I think that's a mac thing. Not sure windows people get it... |
I think Ctrl is the safest option then. |
Shouldn't it show the key depending on the OS, i.e. Cmd for mac and Ctrl for other platforms? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see that we can easily extend the existing key handling code. Some comments inline.
@juliendonck The shortcuts with ctrl worked on my linux machine. The only oddity is when open the help with the keyboard all elements and text are selected.
@xla @rudolfs @brandonhaslegs decided to keep it simple for now and create a link in the settings to our keyboard shortcuts. It didn't make sense to put them in the tooltips for now since there are only 2 places where you'd do it ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💟 🐔 👰 ☣
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Triggering a new keyboard shortcut that opens a modal should close any previous modals right? With these shortcuts I can myself get into a situation where I have many modals open on top of each other and closing reveals all the previous ones I had open. For example, try making a new project, then opening the keyboard shortcuts modal, then new project, then shortcuts modal, etc, etc… it opens endless modals on top of one another. Maybe this can be reported in another issue though.
Excited to have keyboard shortcuts!
Co-authored-by: Rūdolfs Ošiņš <rudolfs@osins.org>
@brandonhaslegs our modal world is a separate concern that we won't be focusing on for now. It's a long story... |
Adds keyboard shortcuts:
// To open help => OS modifier key + /
// To open settings => OS modifier key + ,
// To open search => OS modifier key + p
// To open design system => OS modifier key + d
// To create a new project => OS modifier key + n
Also uses
cmd
key on mac andctrl
on other OS's for all shortcuts.closes #756