-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Change keyboard shortcuts to platform safe #1858
Conversation
Codecov Report
@@ Coverage Diff @@
## release/3.3 #1858 +/- ##
===============================================
- Coverage 23.47% 22.22% -1.26%
===============================================
Files 311 326 +15
Lines 6538 6539 +1
Branches 827 823 -4
===============================================
- Hits 1535 1453 -82
- Misses 4399 4462 +63
- Partials 604 624 +20
Continue to review full report at Codecov.
|
I kind of feel this is not the best move to make. |
What do |
Actually I like this idea! We already block shortcuts when an input or textarea is focused, so it shouldn't interfere with text input. I'd suggest following shortcuts then:
Note that all the letters are quite close on keyboard |
I think we have to be careful here to not interfere with the story's keydown/keyup events if a story component has it.
Those keyboard shortcuts make sense to me. |
I think we can introduce some way to mark element so that it blocks shortcuts when focused, like it's done for all the input fields by default. Maybe some data attribute like |
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'm gonna okay this one because I think it makes sense and fixes some old issues.
Codecov Report
@@ Coverage Diff @@
## release/3.3 #1858 +/- ##
===============================================
- Coverage 22.74% 22.74% -0.01%
===============================================
Files 326 326
Lines 6748 6750 +2
Branches 845 841 -4
===============================================
Hits 1535 1535
- Misses 4579 4601 +22
+ Partials 634 614 -20
Continue to review full report at Codecov.
|
why did we use cmd + shift + c.... it is inspect element shortcut in chrome, it's REALLY annoying.... |
Oh I see, my fault. I wish it was documented here |
Ok looks like we need to switch to letter only shortcuts If anyone wants to open a PR, go for it |
Well, why not make it configurable over |
Issue: #403
See background: #403 (comment)
It turned out that
⌘ ⇧ Q
is "quit all apps" on macOS, and⌘ ⇧ E
just doesn't work, so I usedX
for stories panel andO
(the closest one to previousP
) for search