As a user of Firefox ReaderMode I would like a keyboard command to toggle narrate
Categories
(Toolkit :: Reader Mode, enhancement, P3)
Tracking
()
People
(Reporter: jp, Assigned: micha154)
References
(Blocks 1 open bug)
Details
(Whiteboard: [reader-mode-narrate] )
Attachments
(1 file, 1 obsolete file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:95.0) Gecko/20100101 Firefox/95.0
Steps to reproduce:
I tried to find a keyboard command to trigger narrate in ReaderMode
Actual results:
To the best of my knowledge this does not exist.
Expected results:
In addition to toggling the narration of the article while in ReaderMode, there should be some documentation online for how to do this.
Reporter | ||
Comment 1•3 years ago
|
||
For example , this can be accomplished by copying this JS into the console when viewing an article in ReaderMode:
document.addEventListener('keydown', function (event) {
// Cmd + E to read the article
if (event.metaKey && event.key === 'e') {
document.querySelector("#toolbar .narrate-start-stop").click()
}
});
Then activate the toggle by pressing Cmd + e on a Mac or Windows + e on a PC.
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Reporter | ||
Comment 3•3 years ago
|
||
Is it possible to use cmd + e (i.e. event.metaKey && event.key === "e")? I'm am the original requestor of this issue. My workflow is to open a link in a new tab. Often this is a URL copy and paste. Then to toggle ReaderMode and finally toggle narration. Therefore, the keyboard commands on my mac are:
copy (cmd + c)
set firefox active (cmd + tab)
open new tab (cmd + t)
paste (cmd + v)
load URL (return)
toggle ReaderMode (option + cmd + r)
finally toggle narration
As you can see, in this entire sequence the control key is never pressed. While I'm sure that I will learn to press ctrl + y over time, it seems like it will feel unnatural or at the least more complicated. Is it possible to use cmd (aka metaKey)? cmd + e doesn't appear to be assigned to anything else and would be a very natural key press after enabling ReaderMode.
Comment 4•3 years ago
•
|
||
The meta key unfortunately doesn't work in Windows (see here) so it doesn't make sense to use the meta key.
Updated•3 years ago
|
Updated•3 years ago
|
Comment 6•3 years ago
|
||
After further consideration we are going to make the key command platform specific.
For Mac users it will be cmd + e
For non Mac users it will be ctrl + alt + e
Comment 7•3 years ago
|
||
(In reply to Niklas Baumgardner [:niklas] from comment #6)
After further consideration we are going to make the key command platform specific.
For Mac users it will be cmd + e
For non Mac users it will be ctrl + alt + e
We can't use ctrl+alt shortcuts on Windows, because for users where the keyboard language has an "AltGr" concept, cltr+alt is the same as "altgr" and can be used for typing accented characters and the like. This is why, when using such a modifier set for XUL <key>
elements, we print a warning: https://searchfox.org/mozilla-central/rev/72c7cef167829b6f1e24cae216fa261934c455fc/dom/events/KeyEventHandler.cpp#632-638 .
Instead of using modifiers, could this just be a web-app style single key shortcut? That is, could we just have pressing the letter "n" key without modifiers work this way, if the document has focus, the focused element isn't in an inputfield, and no modifiers are pressed? That would also be a better mnemonic (n for narrate, instead of e for ... ?).
Also, can we make sure to list whatever shortcut key we land on in the tooltip for the play/pause narrate item?
Comment 8•3 years ago
|
||
Thanks for info Gijs.
We will switch to a single key press of "n" to toggle narrate. I think "n" makes more sense for this case.
Pushed by mtigley@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7941091cc105 Adding a keyboard command to toggle narrate in reader mode. r=niklas,mtigley
Comment 10•3 years ago
|
||
bugherder |
Comment 11•3 years ago
|
||
Should we mention that feature in our release notes?
Comment 12•3 years ago
|
||
(In reply to Pascal Chevrel:pascalc from comment #11)
Should we mention that feature in our release notes?
Passing this question to Niklas.
Comment 14•3 years ago
•
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]:
[Affects Firefox for Android]: No
[Suggested wording]: You can now toggle Narrate in ReaderMode with the keyboard shortcut “n”
[Links (documentation, blog post, etc)]:
Comment 15•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Comment 16•3 years ago
|
||
Verified that the implementation works as expected for the narrate in Reader mode when pressing the "n" key. Tests were performed on macOS 10.15.7, Ubuntu 20.04 and Windows 10.
Description
•