[GTK][Mac] Firefox does not respect native key bindings which are conflict with reserved shortcut keys
Categories
(Core :: DOM: UI Events & Focus Handling, defect, P3)
Tracking
()
People
(Reporter: situmam, Assigned: masayuki)
References
(Regression)
Details
(Keywords: regression, Whiteboard: tpi:+)
Attachments
(3 files)
Comment 3•10 years ago
|
||
Comment 5•10 years ago
|
||
| Comment hidden (obsolete) |
| Comment hidden (obsolete) |
| Comment hidden (obsolete) |
| Comment hidden (obsolete) |
| Reporter | ||
Comment 11•9 years ago
|
||
Comment 12•9 years ago
|
||
Comment 13•9 years ago
|
||
Comment 14•9 years ago
|
||
Comment 15•9 years ago
|
||
Updated•9 years ago
|
| Reporter | ||
Comment 16•8 years ago
|
||
| Reporter | ||
Comment 17•8 years ago
|
||
| Reporter | ||
Comment 18•8 years ago
|
||
Comment 19•8 years ago
|
||
Comment 20•8 years ago
|
||
Comment 21•7 years ago
|
||
Comment 22•4 years ago
|
||
Hello! I have tried to reproduce the issue 95.0b4 (64-bit), 96.0a1(2021-11-08), 94.0.1 and 91.3.0esr on Ubuntu 20.
As in the description I have installed the Emacs gtk key theme and I can confirm that the keybindings are working on the latest firefox builds except for the CTRL+N which I brings up a new firefox window.
However CTRL+B does not bring the bookmarks menu.
From what I understand in the description the issue is for the CTRL+N. But I have tried using it in text a text editor and it has no function assigned to it.
Is this still a valid issue or we can close it as WFM?
Thank you!
Comment 23•4 years ago
|
||
I can confirm that Emacs-style keys work in gtk3-demo's text view demo. Ctrl-P/N moves the cursor up or down as expected. Also Ctrl-W deletes a word. These keys do not work in Firefox's <textarea> or <input>. If I were trying to delete a word by Ctrl-W here, my tab would be closed instead.
My Firefox nightly is three-day old, and my GTK 3 version is 1:3.24.30+90+g20be04f7ac-1 on Arch Linux.
Comment 24•4 years ago
|
||
not sure why you need info me. redirecting to the reported.
Comment 25•4 years ago
|
||
Ctrl-W doesn't work, as lilydjwg mentioned. It used to be possible to override the "close window" binding so as to use ^W, but now it's hardwired in a stronger way that doesn't seem possible to override, so typing Ctrl-W to delete the last word instead closes the current tab and there's no option to prevent that. I accidentally close tabs in the middle of typing something fairly often (since Ctrl-W works in most other apps and is ingrained in my fingers).
Comment 26•4 years ago
|
||
I just had to downgrade from Firefox 96.0 to Firefox 95.0.2 on Linux as the Emacs keybindings no longer work. It's not only the text fields that no longer accept the Emacs keyboard shortcuts. The whole user interface is affected.
Comment 27•4 years ago
|
||
I'm running Firefox 96.0.1 on Linux, and Emacs shortcuts still mostly work here (I tried Ctrl+E, Ctrl+U, Ctrl+K, Ctrl+B/F, Alt+B/F).
But Ctrl+A now selects all instead of moving to the beginning of the line, which is especially annoying in the URL bar (and there we also already have Ctrl+L which does the same).
Comment 28•4 years ago
|
||
Can you try mozregression tool if that broke recently?
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems#Use_Mozregression_tool
Thanks.
Comment 29•4 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #28)
Can you try mozregression tool if that broke recently?
Thanks! Here's the result:
2022-01-28T14:46:21.098000: INFO : Narrowed integration regression window from [813c32c6, 853874de] (3 builds) to [67888a3f, 853874de] (2 builds) (~1 steps left)
2022-01-28T14:46:22.365000: DEBUG : Found commit message:Bug 1376091 - For MOZ_WIDGET_GTK, change shortcut for
cmd_selectAllfrom Alt+A to Ctrl+A. r=masayukiWith this patch, we stop registering
Alt+Aas a shortcut key for "Select All" on Linux and registerCtrl+Ainstead, which is the default shortcut for the command on other GTK applications, Chromium, and Windows.Alt+Awas also causing a bug for menubar navigation because it hijacksAlt+Aaccess key. This patch does not stop Linux environments from registeringAlt+Aas a shortcut key for "Select All"; it just drops Gecko's additional, non-standard shortcut key definition, and defaults toCtrl+Ainstead.Differential Revision: https://phabricator.services.mozilla.com/D131062
I checked with Firefox 95 again and I can indeed use Alt+A there to select all in text fields. Ctrl+A on the page (without having a text field focused) still selects all too, both in 95 and 96.
Maybe instead of Alt+A Firefox could use Ctrl+Shift+A as a fallback shortcut when Emacs keys are enabled. Or alternatively, not set a fallback shortcut at all (although I can see the usefulness).
Comment 30•4 years ago
|
||
Oh wait, Ctrl+Shift+A already opens Addons 😅
Updated•3 years ago
|
| Assignee | ||
Comment 31•3 years ago
•
|
||
The new issue was mentioned in the release note: https://www.mozilla.org/en-US/firefox/96.0/releasenotes/
It's been already fixed by bug 1743339 and bug 1743346, however, due to the release schedule, these fixes will be enabled by default in 97 (bug 1747326).
| Assignee | ||
Comment 32•3 years ago
|
||
Ctrl-N etc cases are special cases. They are "reserved" by Firefox for making users who use only keyboard never locked into a web app which prevents focus move with handling all keyboard events.
However, indeed, native key bindings should be respected at checking whether reserved shortcut keys or not.
| Assignee | ||
Updated•3 years ago
|
Comment 33•3 years ago
|
||
Thanks, setting ui.key.textcontrol.prefer_native_key_bindings_over_builtin_shortcut_key_definitions = true fixed it for me!
Comment 34•3 years ago
|
||
In 96.0.3, downloaded from the website just now, setting ui.key.textcontrol.prefer_native_key_bindings_over_builtin_shortcut_key_definitions fixes ctrl-A but it doesn't fix ctrl-W. Go to a page with a text field on it, type some words and then ctrl-W, and firefox exits (if it's the only tab) instead of deleting the word to the left of the cursor.
| Assignee | ||
Comment 35•3 years ago
|
||
It seems that I can fix this in a couple of days. I'm blocked by posted reviews now. Therefore, I'm trying...
Updated•3 years ago
|
| Assignee | ||
Comment 36•3 years ago
|
||
I'd like to use it in IMEData.h. However, adding new include into it may
cause bustage with MinGW, and it's included by nsIWidget.h because nsIWidget
requires some classes defined in IMEData.h. Therefore, I'd like to make a
new header file for avoiding the include hell.
Depends on D137610
| Assignee | ||
Comment 37•3 years ago
|
||
Querying selection for getting writing mode may run script in the main process
if focus is in it. For avoiding new users of writing mode at selection only
when the value is required during an editable content has focus,
TextEventDispatcher should always store writing mode at receiving focus
notification.
Depends on D138007
| Assignee | ||
Comment 38•3 years ago
|
||
Users may map reserved shortcut keys of Firefox/Thunderbird as an editing
command or a navigation command. Therefore if and only if an editable element
has focus and a reserved key combination is mapped to an editing command or
a navigation command by the system settings, we should allow to dispatch it
into the content and work it as what user expects.
With this change, keyboard only users may loose some shortcut keys to leave
from a web content which blocks keyboard focus in it. However, there may
be another reserved shortcut keys to escape from such web apps only with
keyboard because it's hard to think that all reserved shortcut keys conflict
with users' settings.
Depends on D138008
Comment 39•3 years ago
|
||
Comment 40•3 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/1972ca43bb03
https://hg.mozilla.org/mozilla-central/rev/04c035fb4297
https://hg.mozilla.org/mozilla-central/rev/d318d856d6bf
Updated•3 years ago
|
Comment 41•3 years ago
|
||
Thank you, masayuki and all people who have worked on this! I've regained my Ctrl-w shortcut.
Description
•