rust-playground icon indicating copy to clipboard operation
rust-playground copied to clipboard

Playground captures forward and back keyboard shortcuts

Open jsha opened this issue 2 years ago • 2 comments

Steps to reproduce:

  1. Visit https://www.rust-lang.org/
  2. Click "Playground" link
  3. 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).

jsha avatar Oct 25 '22 22:10 jsha

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.

c-git avatar Oct 26 '22 00:10 c-git

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.

jsha avatar Oct 26 '22 01:10 jsha