-
Notifications
You must be signed in to change notification settings - Fork 20
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 all proposed Keyboard shortcuts #451
Conversation
Preview PR at appsharing.space |
Integration tests repot: appsharing.space |
packages/base/src/keybindings.json
Outdated
{ | ||
"command": "jupytercad:newCylinder", | ||
"keys": ["Accel Alt C"], | ||
"selector": ".jcad-Mainview" | ||
}, | ||
{ | ||
"command": "jupytercad:newCylinder", | ||
"keys": ["Accel Alt C"], | ||
"selector": ".jpcad-sidepanel-widget" | ||
}, |
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 wonder if we should introduce a data attribute in our components that should receive keybinding events, like data-jcad-keybinding
or something. Then we could get rid of this duplication and just do something like:
{
"command": "jupytercad:newCylinder",
"keys": ["Accel Alt C"],
"selector": "[data-jcad-keybinding]"
}
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 can try on it, thanks for suggesting.
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.
This worked, thanks @martinRenou.
Done in 2ddc2ed
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.
Ah I meant using a data attribute, not a class, have you tried that? But a general purpose class like you did sounds good too.
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.
Oh sorry, I guess I misinterpreted the idea. I'd be happy to explore this option too if it's more viable.
Might be silly but I'd just want to confirm how do I add data attribute to the component?
Should close #396
Should also close #458
Trust me! I'm pressing the keybinding while being on the the notebook 😇
keys.mov