Che: Cannot open command palette in Theia when using Firefox

Created on 7 Nov 2019  路  4Comments  路  Source: eclipse/che

Describe the bug

Theia doesn't / can't bind the key combination ctrl + shift + p on firefox; attempting to use this shortcut to open the command palette just opens a new private browsing window.

Che version

  • [x] latest 7.3.1

Steps to reproduce

Start a workspace in firefox and press ctrl+shift+p

Expected behavior

Command palette opens.

Runtime

  • [x] Openshift 3.11

Installation method

  • [x] che.openshift.io
areeditoche-theia kinbug severitP2 teaeditors

All 4 comments

Actually there is a duplicated issue created in theia: https://github.com/eclipse-theia/theia/issues/1696
Studying the mozilla sources shows that this shortcut can't be neither overwritten nor disabled.

https://hg.mozilla.org/mozilla-central/file/tip/browser/base/content/browser-sets.inc#l289

    <key id="key_privatebrowsing" command="Tools:PrivateBrowsing" key="&privateBrowsingCmd.commandkey;"
         modifiers="accel,shift" reserved="true"/>

As a workaround, which provided in https://github.com/eclipse-theia/theia/issues/1696, we can rebind this shortcut to F1

Let me clarify.
Here're the commands for opening Command Palette in Theia and VSCode:

Theia
image

VSCode Online
image

VSCode Electron
image

As you can see, there are different hotkeys in all cases. But actually there's a common key for opening Command Palette everywhere - F1. It's supported by VSCode (electron+online) and Theia as well. It works well in all browsers. It comes from the underlying Monaco editor. VSCode just proposes alternative hotkeys - Alt+X and Ctrl+Shift+P.
BTW as I know, F1 is more know and more spread than others.

I'd say Ctrl+Shift+P it's rather a "hidden" feature in Theia since this is not declared anywhere.
I don't see a reason why a hotkey from VSCode Electron version has to be supported by Che Theia.

VSCode Electron uses Ctrl+Shift+P because it works well in Chrominum inside Electron.
But in FireFox, Ctrl+Shift+P is a reserved hotkey that can not be overridden. That's why VSCode Online introduced a completely different hotkey - Alt+X.

I believe it's not a bug since there is a key for opening Command Palette in FireFox - F1.
I'd close it. WDYT guys?
cc/ @slemeur

Adding @beaumorley for awarness.

Thanks for the precise analyze and studying the other alternates. I'm +1 for closing the issue. Eventually, we could add the support for Alt+x, depending on user feedbacks. Otherwise, I like having F1 as being the hotkeys working for every browser.

Was this page helpful?
0 / 5 - 0 ratings