-
Notifications
You must be signed in to change notification settings - Fork 90
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
Add keyboard shortcuts #107
Conversation
@domoritz Can you share few more useful keyboard shortcuts for the editor? |
this.editorWillMount = this.editorWillMount.bind(this); | ||
} | ||
public handleKeydown(e) { | ||
if (e.keyCode === KEYCODES.B && e.ctrlKey && !this.props.autoParse) { |
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.
On mac os, it's CMD+B. We should be agnostic to that. How do we do this best?
I think build is the most important one. We could override CMD+S to build as well. |
Visual feedback added. |
|
||
.button:active, | ||
.button-press { | ||
box-shadow: 0 0 1px 0 #000; |
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.
box-shadow: 0 0 5px 1px steelblue;
} | ||
|
||
.button:active, | ||
.button-press { |
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.
just use pressed
as the class
<button | ||
id="parse-button" | ||
className={this.props.parse ? 'button button-press' : 'button'} | ||
onClick={() => this.props.parseSpec(true)} |
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.
can you make it so the button doesn't change when you click on it manually?
Add keyboard shortcuts
(Ctrl || CMD) && (B || S)
for parsing.Fixes #100.