New issue
Advanced search Search tips

Issue 636515 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Missing keyboard shortcuts for Chrome PDF Viewer

Project Member Reported by bcmi...@google.com, Aug 10 2016

Issue description

Chrome Version       : 53.0.2785.36
OS Version: 8530.35.0
URL: http://static.googleusercontent.com/media/research.google.com/en//pubs/archive/43823.pdf

What steps will reproduce the problem?
1. Open a PDF in Chrome.
2. Try to read it without using a mouse.

What is the expected result?
All of the on-screen UI elements should have keyboard equivalents.

What happens instead of that?
There are keyboard shortcuts for "rotate", "save", and "print", but not "fit to page" or "zoom in/out".


UserAgentString: Mozilla/5.0 (X11; CrOS x86_64 8530.35.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.36 Safari/537.36



 
Project Member

Comment 1 by sheriffbot@chromium.org, Aug 11 2016

Labels: Hotlist-Google
Components: Internals>Plugins>PDF
Labels: OS-Linux OS-Mac OS-Windows
Status: Available (was: Unconfirmed)
Zoom in/out is the same as the rest of the web browser - ctrl + - and ctrl + =. Any suggestions for fit-to-{page,width} that doesn't conflict with other browser shortcut keys?

Comment 3 by bcmi...@google.com, Aug 26 2016

ctrl+\ and ctrl+; don't seem to be taken, and either of those would go pretty well with ctrl+[ and ctrl+] for rotation.
Cc: wjmaclean@chromium.org
How about just mapping the ctrl+\ (not taken according to ctrl+alt+? on my Chromebook) to a toggle between fit-to-{page,width} ? That way it maps 1:1 with the zoom toggle button.

+wjmaclean for all zoomy things.

Comment 5 by bcmi...@google.com, Aug 26 2016

A single key to toggle seems ideal, since that's what the on-screen button does to.
Owner: thestig@chromium.org
Status: Started (was: Available)
I can pretend to write JS: https://codereview.chromium.org/2283803003
Status: Fixed (was: Started)
I think we should not use event.keyCode attribute to detect keys as people have issues on AZERTY keyboards. See comment #1 at https://plus.google.com/+FrancoisBeaufort/posts/VPCSTsUjDK6

I would recommend using new "code" Attribute for that. See https://developers.google.com/web/updates/2016/04/keyboardevent-keys-codes?hl=en and https://w3c.github.io/uievents/tools/key-event-viewer.html
fbeaufort: Thanks for the tip. I'll switch chrome/browser/resources/pdf/ to the "code" attribute. Would you be able to help test / review the CL?

It does appear "\" may not be the best choice for several non-US layouts.

Even the "-+[]" grouping is bad for AZERTY. Not sure if AZERTY keyboard users are just used to it, or if there is some keyboard layout specific adjustments in software somewhere.
Cc: fbeaufort@chromium.org
Oh, event.code is funky. If I switch to it:
- Does that mean '^' and '$' on a French AZERTY keyboard will map to '[' and ']' respectively?
- Isn't '\' still in a weird spot on keyboards with a double row enter key?
- Won't virtual keyboards stop working?
- It breaks Chrome in VNC for me as described below.

Right now I'm accessing my workstation over VNC. In VNC:
- key '[' is code 'KeyY'
- key ']' is code 'KeyU'
- '\' is 'ControlLeft'

Many other keys are mapped funny as well. I know QEMU also does not work right inside VNC for me. There, I have to run "qemu -k en-us" for it to work. The QEMU manpage mentions this is necessary for VNC. Maybe we should open a new bug...
https://codereview.chromium.org/2358553002 to switch to the "code" attribute. Probably a work in progress given the above.
I've switched to french (AZERTY) Mac keyboard and I can't even find the \ key on it... We should definitely try to find something better there that works for everyone. 

Sign in to add a comment