mozilla-services / screenshots

Firefox Screenshots: the best way to take screenshots on the web.
https://screenshots.firefox.com
Mozilla Public License 2.0
620 stars 128 forks source link

Triage: keyboard shortcut #2491

Closed ianb closed 6 years ago

ianb commented 7 years ago

We haven't implemented a keyboard shortcut. For accessibility we may want to (see #2251). If we do, we should find someone that can help us find a keyboard shortcut that won't cause too many problems, as conflicts seem common.

Note there's a metric associated with this, if we don't implement a keyboard shortcut we should update METRICS.md to show it is deprecated; if we do implement it we should use the documented metric.

ghost commented 7 years ago

Dolske suggested @gijsk might have a recommendation since he's working on keyboard accessibility

gijsk commented 7 years ago

For the keyboard shortcut to be discoverable you'd need a menuitem, and that'd help inform what screenshot to use. ctrl-shift-s on Windows/Linux and ctrl-opt-s on OSX seem obvious choices, but they're currently used by the devtools debugger. I suppose if we ask nicely maybe the debugger can find a different one; screenshots are arguably useful to more people than the script debugger... I suck at github so I don't know how to ping folks (or maybe github's autocomplete is just broken).

In any case, it would be nice if there was a keyboard equivalent other than the shortcut (ie a menu item, somewhere/somehow).

garbados commented 7 years ago

Hey! I found this mdn tutorial for adding keyboard shortcuts, but I don't know where an HTML solution like that would go in the project. In order to provide the right metrics, I assume a JS component would also be necessary. Where file-wise would those changes go?

jaredhirsch commented 7 years ago

@garbados Hi there! This bug might be a little bit weird, since it's not clear if we can use the WebExtensions APIs, or will have to resort to old-school XUL/restartless addon techniques, like the XUL tutorial you found on MDN. (XUL is an XML-based language which is more like a distant cousin of HTML, and it has a pretty rough learning curve. Probably would be a frustrating experience for someone new to Firefox hacking.) I'd suggest you grab a good first bug instead :+1:

@gijsk Hey, thanks for the info. I noticed the commands API gives WebExtensions the ability to register hotkeys. Would that be the right approach here? I don't see any APIs that give WebExtensions the ability to add menu items, so would we need to do that from the embedding restartless addon?

gijsk commented 7 years ago

@gijsk Hey, thanks for the info. I noticed the commands API gives WebExtensions the ability to register hotkeys. Would that be the right approach here? I don't see any APIs that give WebExtensions the ability to add menu items, so would we need to do that from the embedding restartless addon?

I don't know that much about webextensions, actually, so I'm not sure. You could definitely do it from the embedding restartless add-on. Kris or other webextensions folks would be good people to ask.

ianb commented 7 years ago

It wouldn't be as helpful as a menu item under Tools, but we do have a context menu item where we could put the keyboard shortcut, and we could advertise it on the instructions screen.

gijsk commented 7 years ago

I don't think we display shortcuts for context menus. Of course, you could include one in the label but that'll just be ugly.

What we've done elsewhere is include the shortcut in tooltips on buttons (you can try this today on e.g. the downloads button). However, this isn't really sufficient for real keyboard access and accessibility in general - users using screenreaders and other a11y tools generally benefit most from toplevel menuitems (whether that be under Tools or somewhere else).

ianb commented 7 years ago

I've opened #2539 for triage as to whether we should put something in Tools.

ghost commented 7 years ago

@johngruen check this out

johngruen commented 7 years ago

@ianb How about ctrl-shift-alt-s / cmnd-shift-opt-s?

ghost commented 7 years ago

Marking as needs:ux to identify how to show the keyboard shortcut to users.

ghost commented 7 years ago

https://bugzilla.mozilla.org/show_bug.cgi?id=1365757

ghost commented 6 years ago

this is still unsolved. c'mon guys.

rybarova commented 6 years ago

Is it possible to add settings for custom shortcuts? That means a different shortcuts for different users? That would eliminate the problem with conflicts.

johngruen commented 6 years ago

Okay, here's the deal. we want to do this...I'll move it into our product backlog to make sure it gets ranked along with other features.

abitrolly commented 6 years ago

I need to make screenshot of broken html in Firefox extension. Reaching out to menu removes extension popup from the screen, so I am looking for shortcut to capture it.

step21 commented 6 years ago

Adding to this, @abitrolly would be great if this could be taken into account, because as far as I understand with these extension popups especially, a keyboard shortcut seems like it should not affect the popup but often will anyway.

johntyree commented 6 years ago

Is there something that prevents us from having user-configurable shortcuts? Then you can pick whatever convoluted default you'd like and users that care can solve their problems for themselves.

RobinEd commented 6 years ago

keyboard shortcuts seem to have been removed from a whole load of addons - the screenshot thing is great but takes a lot of time with dragging the mouse!

step21 commented 6 years ago

@RobinEd what takes time? you can just click elements or click 'whole page' etc, not sure how this could be faster?

mimarque commented 6 years ago

@step21 It's not about taking time, at least for me. It's about losing focus over an element for example.

Like having a open Dropbox and clicking on the snapshot button loses focus and can't use it.

RobinEd commented 6 years ago

@step21 mouse and click three dots thing, mouse and click take screenshot, mouse and click save full page (or other option), mouse and click download button, mouse and click save (for some reason always in the download directory and not the last saved in directory). That's a lot of clicking when it could be +ANYKEY for full screen or +ANYOTHERKEY for part and then straight to the save dialog.

sevaan commented 6 years ago

How about ctrl-shift-alt-s / cmnd-shift-opt-s?

This should work, but I would suggest cmnd-shift-ctrl-s on the Mac as well (just more natural to hit those keys, and better matches the shortcut on PC.

Screenshots, with the keyboard shortcut, should also be added to the Tools menu.

screen shot 2018-03-05 at 10 00 09 am

Lewiscowles1986 commented 6 years ago

Although it's not a key-press for screenshot, I did notice that when a page seemed to break this addon (right clicking would not allow me to screenshot), I could click the ellipsis icon in the address-bar and take a screenshot from there

dobromir-hristov commented 6 years ago

I want this so much... ctrl-shift-alt-s is perfectly fine with me. (i think adding win for Windows is not a good idea)

SoftVision-PaulOiegas commented 6 years ago

Hi @ianb. Will this be implemented soon by any chance? Just talked with a QA automation team from Softvision about Screenshots use in automation and they were thrilled to have a tool like this in their work. The only thing that stops them from using is the lack of keyboard shortcut. 🙁

abitrolly commented 6 years ago

Maybe it will help if Firefox could also advertise system shortcuts for taking screenshots. For example, in Fedora/GNOME it is Ctrl+Shift+PrtSc to select area and put it to clipboard. Very convenient. Especially with Ctrl+V working in GitHub forms.

image

pehamraza commented 6 years ago

+1 for this, following

Dubidubiduu commented 6 years ago

+1

designsimply commented 6 years ago

+1 adding my vote for this. I use full page screenshots alllllll the time and ❤️ them.

Not sure exactly what keyboard shortcut would work best! I know you need to consider conflicts and I just wanted to say thanks for keeping this issue open and that I for one will be happy with whatever is picked.

jaredhirsch commented 6 years ago

TL;DR: A lot of people seem to want this, so I wrote a patch today. I chose Alt + Shift + S, except on Mac, where I chose Command + Shift + S.

Does anyone following this bug have comments or concerns about this key combination?


Re: the comments from @sevaan and @johngruen:

How about ctrl-shift-alt-s / cmnd-shift-opt-s?

This should work, but I would suggest cmnd-shift-ctrl-s on the Mac as well (just more natural to hit those keys, and better matches the shortcut on PC.

It turns out that webextensions only allow Shift plus one other modifier key.

Looking at the existing shortcuts in Firefox and Devtools, Ctrl + S and Ctrl + Shift + S were taken, so I went withAlt + Shift + S. Command + Shift + S seemed more idiomatic for Mac.

jaredhirsch commented 6 years ago

Note that my PR doesn't add an item to the Tools menu, or add keyboard shortcuts for one-click full-page or save-visible shots. If these things matter to you, please file a new bug :+1:

gijsk commented 6 years ago

Alt isn't normally used on its own for actual shortcuts on Windows. Instead it is used for access keys, and so on Windows Alt-Shift-S opens the history menu in Firefox. I don't know if the same happens on Linux, but I would expect so. I doubt that having a shortcut that overlaps with access keys is a good idea. Using Ctrl-Alt-[letter] on Windows is also out, for the reasons stated in https://bugzilla.mozilla.org/show_bug.cgi?id=1438308#c4 . On Windows 10, Win-Shift-S is already mapped to the OS screenshot tool.

I think the best path forward might be talking to the devtools people about how much they need the Ctrl-Shift-S shortcut (it opens the debugger), which AIUI other browsers don't support anyway. Perhaps screenshots could take that over.

jaredhirsch commented 6 years ago

Oh, good catch, @gijsk! I didn't think to look at the accessibility shortcuts.

I'll ping the devtools channel on Monday about that shortcut. I thought it seemed like an odd mnemonic to use Ctrl-Shift-S to open a debugger. It looks like devtools has also taken Ctrl-Shift-D to "cycle between docking modes". I can't imagine either of those shortcuts gets much use, but hopefully there's some Telemetry data that can confirm usage levels.

I'll mark the PR as not ready to merge, for now.

@gijsk, random related question: do you have any idea why the "Keyboard Planning FAQ" page is only available as an archived page, and doesn't seem to live in the current wiki? https://website-archive.mozilla.org/www.mozilla.org/access/access/keyboard/

gijsk commented 6 years ago

I think it's just never been updated. It's wildly out of date when looking at some of the specifics (navigator.dtd, some of the XBL bindings listed), and looks like it was written when the Mozilla Suite (aka SeaMonkey) was more present/important than Firefox (so 2004 or earlier).

jaredhirsch commented 6 years ago

I spoke to @digitarald about devtools keyboard shortcut usage. They don't currently measure which keys are used to open devtools, and Harald helpfully filed https://bugzilla.mozilla.org/show_bug.cgi?id=1456984 to add the keys to the existing ping. It seems like the devtools team might be able to get this landed before 61 goes to beta, so we could have data on Dev Edition usage within a couple of weeks: 61 goes to developer edition on May 7th, and data should be available within a few days to a week after that.

Once the data's been gathered, digitarald will make a decision about whether they want to keep the shortcut, and we'll either use Ctrl + Shift + S, or pick something else.

I'll update this bug as things move along.

abitrolly commented 6 years ago

If there is a chance to make a research, then it is useful to have a table that lists shortcuts for screenshot functions across various operation systems. Like in Fedora I don't need this functionality from FF, because Ctrl+Shift+PrtScr (select area and store in clipboard) covers 80% of what I need. But discovering this is hard. So if Firefox could advise users on systems shortcuts - that would greatly improve user experience and push it outside of the browser.

jaredhirsch commented 6 years ago

@abitrolly All operating systems provide built-in screenshots, but we're not concerned with those in general. Thanks for the suggestion, though.

ijsnow commented 6 years ago

Is there a way to map this action to a browser command? If it were possible, I'd just write a quick browser extension for this instead of waiting for the consensus on what keys to use. I don't care what the keys are I just want to not have to use my mouse :P

samtuke commented 6 years ago

Also hoping for new screenshot shortcuts soon

arunsathiya commented 6 years ago

Dropping by to note my interest for keyboard shortcuts as well. :)

clouserw commented 6 years ago

@6a68 any updates since you talked to @digitarald?

jaredhirsch commented 6 years ago

The Telemetry probes are in Firefox 62, which went to developer edition late in June. I'll ping to see if they have enough data yet to make a decision

koolamusic commented 6 years ago

AAny updates so far ?

digitarald commented 6 years ago

@6a68 with the data from dev-edition we find that shortcut usage for debugger is low enough. I am circling back with the team to see if I missed any trade offs.

digitarald commented 6 years ago

@6a68 👍 from DevTools side.

Only major thing to keep in mind is to update DevTools MDN pages on shortcuts (just by adding dev-docs-needed). Let us know if you need any help with migrating the shortcut to screenshots.

jaredhirsch commented 6 years ago

@digitarald Fantastic! Thanks for the update. I'll add this to the bug list for tomorrow's triage.

stamster commented 6 years ago

Still N/A in latest official FF builds?

nod5 commented 6 years ago

@6a68

Note that my PR doesn't add an item to the Tools menu, or add keyboard shortcuts for one-click full-page or save-visible shots. If these things matter to you, please file a new bug 👍

There are plenty of external tools, OS bundled or third-party, to screenshoot area or visible window. Not so for fullpage screenshot. For that reason add a keyboard shortcut to without any extra steps save a fullpage screenshot to the default download folder.

ianb commented 6 years ago

Closed for #5089, which summarizes the discussion.