openfoodfacts / power-user-script

User script for your browser, to empower Open Food Facts contribution
GNU Affero General Public License v3.0
12 stars 5 forks source link

Alt+Shift+I opens a "Send feedback to Google" window on Chrome #50

Open jolesh opened 3 years ago

jolesh commented 3 years ago

Alt+Shift+I seems to be a shortcut already used by Chrome

jolesh commented 3 years ago

The Window

benbenben2 commented 1 year ago

Alt+Shift+I, is a shortcut to access directly to the Ingredients when the user is in the edit page of a product.

The related part of the code is:

                // (I): ingredients
                if (pageType === "edit" && event.key === 'i') {
                    toggleIngredientsMode();
                    return;
                }

Remark: already used letters for Alt + Shift + key: (P)roduct name, (Q)uality, (B)rands, (C)ategories, (L)abels, (I)ngredients, e(N)ergy, (F)ibers

Remark: Shortcuts in conflict: For Windows: Chrome: Alt + Shift + i (Open a feedback form ) Edge: Alt + Shift + B (Set focus on the first item in the favorites bar) Edge: Alt + Shift + I (Open the Send feedback dialog) Brave: none Vivaldi: none

For Mac: Chrome: ⌘ + Shift + n (Open a new window in Incognito mode) Safari: none Edge: Command + Shift + B (Show or hide the favorites bar) Edge: Command + Shift + C (Open Developer tools) Brave: ⌘ + Shift + n (Open a new window in Private mode) Brave: ⌘ + Shift + b (Show or hide the Bookmarks Bar)

References: https://support.google.com/chrome/answer/157179?hl=en https://support.apple.com/guide/safari/keyboard-and-other-shortcuts-cpsh003/mac https://support.microsoft.com/en-us/microsoft-edge/keyboard-shortcuts-in-microsoft-edge-50d3edab-30d9-c7e4-21ce-37fe2713cfad https://support.brave.com/hc/en-us/articles/360032272171-What-keyboard-shortcuts-can-I-use-in-Brave- https://vivaldi.com/blog/10-shortcuts-you-should-try-today/

Option 1: duplicate shortcuts "alt+shift+key" and something like "ctrl+shift+key". Hence, if one is already used in a webbrowser, the other is hopefully available. -> Unfortunately it will not work in Edge for letters b and i (alt+shift+b, crtl+shift+b, alt+shift+i, crtl+shift+i are already used in Edge)

Option 2: change for another letter in the same word: in(G)redient (n, being already used for e(N)ergy) Letter G? -> Command + Shift + G (Jump to the previous result for find on page) is also used for Chrome on Mac (Jump to the previous match to your Find Bar search). Letter R? -> used in Chrome on Mac, Safari, Letter E? -> seems availale Letter D? -> used in Chrome for Mac, Safari Letter T? -> used in Edge, Vivaldi

@CharlesNepote, @teolemon: What do you think of option 2, with letter "E"?

hangy commented 1 year ago

Maybe there's some overview of shortcuts used in existing browsers? It might be an issue that shortcuts might be different on different platforms and languages. 🤔

benbenben2 commented 1 year ago

Hi @hangy! The links I provided in my last comment is the overview of shortcuts used in some common browsers (chrome, safari, edge, brave, vivaldi)