Theia: alt+n triggers a new file while editor is focused

Created on 26 May 2020  ·  14Comments  ·  Source: eclipse-theia/theia

Instead it should insert ~ only. It is not a regression.

bug help wanted navigator

Most helpful comment

All 14 comments

Hi, i would like to work on this issue.

I am not sure how we should tackle it. What would better keybinding for the browser target? In electron we use the same keybinding as in VS Code and it works well. cc @eclipse-theia/ecd-theia-committers

Sorry @akosyakov, I didn't get what the actual issue with Alt+N keybinding.
Is it about using the same keybinding for both browser and electron? Or something else?

Steps to reproduce:

  • use Theia via the browser
  • open a new file
  • press alt+n
  • expected that ~ is inserted and the new file dialog does not pop up

@azatsarynnyy is it better?

why pressing alt+n should insert ~?

Maybe it is related to german layout on mac only 🤔 cc @spoenemann

Most importantly here that the new file dialog does not pop up on any platform if an editor is focused and such keys expected to insert something.

why pressing alt+n should insert ~?

Well, I had the same question yesterday and tried it locally with EN_US layout on macOS; it really inserts a tilde but another one:

~
˜

The first one is with Shift+`, the second is with Alt+N.

screencast 2020-05-28 12-58-06

BTW: on mac with US layout alt+n inserts a superscript tilde, which when followed e.g. by an n allows to enter Enye (Ñ, ñ).

Maybe change to cmd+alt+n on Mac?

@spoenemann sounds good if it does not affect other platforms.

Most importantly here that the new file dialog does not pop up on any platform if an editor is focused and such keys expected to insert something.

interesting...
for me, alt+n opens New File dialog
Peek 2020-05-28 14-56
Linux Fedora, Chrome, en_US


upd: I understood it now :smile: thx @akosyakov

Have the same behavior as @azatsarynnyy has, but on the macOS under Chrome 81:

tilda

The better way will be to assign New File action to another key combination. Because with alt key on macOS it's possible to enter various chars, e.g. œ∑´®†¥¨ˆøπ“‘åß∂ƒ©˙∆˚¬…æ«Ω≈ç√∫˜µ≤≥÷

//update, it is possible to type ˜ and immediately char n to get ñ, so yes, it default os behavior, need to look up for free keybinding

Was this page helpful?
0 / 5 - 0 ratings