-
Notifications
You must be signed in to change notification settings - Fork 499
[Codebridge] Added weblab and pythonlab shortcuts for run button, console, and editor #65839
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
base: staging
Are you sure you want to change the base?
Conversation
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.
If helpful, here is the original PR that added a run shortcut for legacy labs! #55942
Two things:
- I totally misremembered 🤦 - looks like CTRL+Enter is what we wired up for Run (not CTRL+R)
- That PR created a KeyHandler util that may be useful here!
ooo thank you! I'll take a look at this handler! Also, I might stick with R considering the rest of the shortcuts are letters... but definitely open to feedback. |
@sanchitmalhotra126 How would you feel about me adding a preventDefault() to the keyHandler? |
mmm actually this seems to interfere with the rest of the keyboard events so I'm not sure there is an easy way to utilize this util in PythonLab. I would also have to register both ctrl and command, which I believe would make it just as many lines changed😅 Alright with you if I maintain the current approach? |
Yep, totally fine! |
Adds keyboard shortcuts for the run button (ctrl + r), the editor (ctrl + e) and the console output (ctrl + o) for PythonLab (and the edit shortcut works for Weblab).
I added this in Codebridge so it would work for pythonlab and weblab.
Below is a video! It's a bit hard to follow unless you can see the focus, which I use the shortcuts to move between run button, editor, and output.
This is after hearing from the Maryland School for the Blind kids that they'd like a quicker way to navigate between the most important parts of the page!
I elected to use ctrl + instead of just the letters so that the shortcuts also work from within (and don't interfere with) the text editors (console and workspace editor).
I have a mac, so would appreciate someone testing this on another device!
Screen.Recording.2025-05-14.at.1.22.33.PM.mov
Links
Testing story
Deployment strategy
Follow-up work
Privacy
Security
Caching
PR Checklist: