rust-playground
rust-playground copied to clipboard
Playground captures forward and back keyboard shortcuts
Steps to reproduce:
- Visit https://www.rust-lang.org/
- Click "Playground" link
- Type Alt+Left Arrow on keyboard
Expected results:
Browser navigates back to https://www.rust-lang.org/.
Actual results:
Nothing happens.
This is on Chrome 106.0.5249.119 (Official Build) (64-bit), Linux (Ubuntu 22.04).
I suspect this is a "desired" behaviour. Because Alt + the up and down arrow keys move code up and down and left and right jump the cursor around not just one character at at time.
Right, I suspect it's desired in that sense (that there should be keystrokes to jump the cursor around), but not desired in the sense that it overrides browser shortcuts. For instance, on a Mac, the browser forward/back keystroke is Cmd-Left/Right, so this keybinding wouldn't override the browser one. I'm guessing the fact that it overrides a browser shortcut on Linux (and Windows?) is not desired.