-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Display a shortcuts modal #3791
Conversation
This is a great start! Next step is to move the English strings from |
@bhousel I couldn't make enough space in the modal (without making the width larger, allowing for a two column format) to show all shortcuts in the wiki. Is it ok to show only the most used shortcuts or should we display all of them? |
@ajithranka We shouldn't generate secret shortcuts by omitting them from the display. In case we want to omit something from the modal, we can omit all shortcuts for buttons which are directly visible on the UI, e.g. radial menu operations, or undo/redo/save. We can do that, because the operation is easily accessible by using the button, and the shortcut is discoverable due to the hover text. In case we want to display all shortcuts the modal could have multiple tabs, or collapsible sections plus scrollbar. |
I assume that the Mac command key will change to |
Yes, |
7350ef9
to
b43e30d
Compare
modules/ui/shortcuts.js
Outdated
var description = p | ||
.append('span') | ||
.attr('class', 'col8') | ||
.text(function(d) { return t('shortcuts.' }); |
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.
@bhousel I want to form for e.g. t('shortcuts.display.zoom')
over here. d would have d.key == 'zoom'
. But what would be the best way to get display
? and is this approach fine?
modules/ui/shortcuts.js
Outdated
import { shortcuts as shortcutsData } from '../../data'; | ||
|
||
export function uiShortcuts() { | ||
var key = uiCmd('⇧/'); |
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.
I think we only need uiCmd when there's a ⌘ involved.
3fb0f57
to
fc39e96
Compare
@bhousel lets merge this? 😎 |
|
@bhousel made some changes. We still need to figure out a clickable link which opens the shortcuts modal. |
Just rebased this branch to master. Looks like a great start - getting it merged will be my focus this week. |
Deployed iD. |
How do I view this? When I press |
Thanks @magol - I just made a change that should fix this, but I'm going to open a separate issue just in case it didn't. |
Shows a subset of shortcuts from this wiki page on pressing
?
.cc: @bhousel @kepta