Closed Bug 1438308 Opened 6 years ago Closed 6 years ago

Pressing AltGr+R on Windows enters Reader View (Ctrl+Alt+R)

Categories

(Toolkit :: Reader Mode, defect)

58 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla60
Tracking Status
relnote-firefox --- 60+
firefox60 --- fixed

People

(Reporter: henrik.pauli, Assigned: Gijs)

References

Details

(Keywords: user-doc-needed)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20180206200532

Steps to reproduce:

I was typing on my international keyboard (a layout that contains an AltGr key), and accidentally hit R instead of E which would have produced the character I wanted (é in my case, but it does not matter).

This is due to Windows having a weird legacy treatment of the AltGr key, which makes it emit not a Right Alt, nor a specific, separate AltGr key down event, but a Left Ctrl and Right Alt keydown event.

Pressing AltGr+R on X11 for example does not result in a misinterpretation of the keypress as a control shortcut.


Actual results:

Firefox entered (and later when AltGr+R was pressed again, exited) Reader View.

Sadly, this also resulted in losing whatever I had in the forms of the website.


Expected results:

Firefox and websites should not ever trigger Ctrl+Alt shortcuts when AltGr is pressed.
Any character associated with the AltGr+key combination — or none if there is no character on third level — should be entered (into the text entry or wherever).

Additionally, Firefox should not lose data from (accidental) triggering of a view mode change.
Component: Untriaged → Keyboard Navigation
If it seems similar to #900750, it might be because it's the same issue somewhere deep in Firefox — but this is not about what the rendered websites (and DOM and JS and whatever) should get exposed to, but more about a mishandling outside of the web view, in the browser chrome.  So it may or may not be related.
The shortcut should be changed. Ctrl+Alt+<character> shortcuts should never be used on Windows.
Component: Keyboard Navigation → Reader Mode
Product: Firefox → Toolkit
(In reply to Neil Deakin from comment #2)
> The shortcut should be changed. Ctrl+Alt+<character> shortcuts should never
> be used on Windows.

Are there alternative shortcuts that are available? Ctrl-R and Ctrl-Shift-R are both taken...
Flags: needinfo?(enndeakin)
I don't think I'm the right person to have an answer to that. You shouldn't use Ctrl+Alt on Windows because that can map to a printable character.
Flags: needinfo?(enndeakin)
Blocks: 1144749
The F9 shortcut seems to have been the other main suggestion in bug 1144749, and that doesn't work well on mac (which also doesn't have Windows's AltGr problem) so keeping the old shortcut there.
Assignee: nobody → gijskruitbosch+bugs
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Comment on attachment 8952396 [details]
Bug 1438308 - switch reader mode shortcut to F9 on Windows,

https://reviewboard.mozilla.org/r/221646/#review227646
Attachment #8952396 - Flags: review?(markh) → review+
Comment on attachment 8952396 [details]
Bug 1438308 - switch reader mode shortcut to F9 on Windows,

https://reviewboard.mozilla.org/r/221646/#review227666

Apologies for not understanding you hadn't tested this - I tested it and as you suspected, it doesn't work. Using keycode instead of key works though. It might also make sense to change the string name from `.win.key` to `win.keycode`. I'll leave r+ as I don't think it's necessary to see it again with those tweaks :)

::: browser/base/content/browser-sets.inc:289
(Diff revision 1)
>      <key keycode="VK_F11" command="View:FullScreen"/>
>  #endif
> +#ifndef XP_WIN
>      <key id="key_toggleReaderMode" key="&toggleReaderMode.key;" command="View:ReaderView" modifiers="accel,alt" disabled="true"/>
> +#else
> +    <key id="key_toggleReaderMode" key="&toggleReaderMode.win.key;" command="View:ReaderView" disabled="true"/>

This must use keycode
(In reply to Mark Hammond [:markh] from comment #8)
> Comment on attachment 8952396 [details]
> Bug 1438308 - switch reader mode shortcut to F9 on Windows,
> 
> https://reviewboard.mozilla.org/r/221646/#review227666
> 
> Apologies for not understanding you hadn't tested this - I tested it and as
> you suspected, it doesn't work. Using keycode instead of key works though.

No worries, I really ought to have tested the patch. Thanks for the quick reviews!
Pushed by gijskruitbosch@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/1682b050cbeb
switch reader mode shortcut to F9 on Windows, r=markh
Release Note Request (optional, but appreciated)
[Why is this notable]: The original shortcut was relnoted
[Affects Firefox for Android]: no
[Suggested wording]: On Windows, the shortcut for entering Reader View has changed to F9, for better compatibility with keyboard layouts which use AltGr.
[Links (documentation, blog post, etc)]: n/a
Keywords: user-doc-needed
https://hg.mozilla.org/mozilla-central/rev/1682b050cbeb
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla60
(In reply to :Gijs from comment #12)
> Release Note Request (optional, but appreciated)
> [Why is this notable]: The original shortcut was relnoted
> [Affects Firefox for Android]: no
> [Suggested wording]: On Windows, the shortcut for entering Reader View has
> changed to F9, for better compatibility with keyboard layouts which use
> AltGr.
> [Links (documentation, blog post, etc)]: n/a

Added to Firefox Nightly 60 release notes.
(In reply to Pascal Chevrel:pascalc from comment #14)
> Added to Firefox Nightly 60 release notes.

The support article should also be updated.
https://support.mozilla.org/kb/keyboard-shortcuts-perform-firefox-tasks-quickly
(In reply to Gingerbread Man from comment #15)
> (In reply to Pascal Chevrel:pascalc from comment #14)
> > Added to Firefox Nightly 60 release notes.
> 
> The support article should also be updated.
> https://support.mozilla.org/kb/keyboard-shortcuts-perform-firefox-tasks-
> quickly

Submitted a revision to this. I already needinfo'd Joni to approve another one I made for the quit shortcut for an older change.
Depends on: 1442145
No longer depends on: 1442145
See Also: → 1441788
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: