Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

You can no longer enter in the editor a character that requires ALT + SHIFT ([, ], \, …) #54303

Closed
fabriceci opened this issue Oct 27, 2021 · 8 comments · Fixed by #56695
Closed

Comments

@fabriceci
Copy link
Contributor

fabriceci commented Oct 27, 2021


Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.


Godot version

4.0 Dev (8c162f4)

System information

macOS 11.5

Issue description

On mac some character that we use for programming required to do ALT + SHIFT + some key:

  • [ and ] = ALT + SHIFT + ( or )
  • \ = ALT + SHIFT + /
  • etc.

This worked fine in 3.x:

before

Now is broken:

after

Steps to reproduce

Open the editor, try to enter a [ on a mac keyboard.

Minimal reproduction project

/

@bruvzg
Copy link
Member

bruvzg commented Oct 27, 2021

It is a regression from #43663, which is blocking Alt (e.g. this line in LineEdit and equivalent in other controls)

bool allow_unicode_handling = !(k->is_command_pressed() || k->is_ctrl_pressed() || k->is_alt_pressed() || k->is_meta_pressed());

This is not macOS specific, AltGR is also used as a third-level input modifier on Windows and Linux.

Edit: If I remember correctly, it's also possible to configure Win or Right Control as 5-level modifier on Linux.

@akien-mga
Copy link
Member

CC @EricEzaM

@EricEzaM
Copy link
Contributor

EricEzaM commented Oct 27, 2021

I think this is a duplicate of #6851

@bruvzg I don't think it is a regression from that PR, but I'm not sure. The issue was never really solved as #54303 was reverted. A PR was opened for this - #52452, but Paul was not convinced it was the right fix, and #43888 might be required before having a full fix.

@bruvzg
Copy link
Member

bruvzg commented Oct 28, 2021

I don't think it is a regression from that PR, but I'm not sure.

Maybe it's not. Removing the condition from the allow_unicode_handling fixes it, and this line was introduced in #43663. So I assumed it is a regression. Also, it's not an issue in 3.x.

The only issue with the #52452 seems to be:

Note that if a shortcut consists of Ctrl + Alt + [some key used for a special character], the character input is handled AND the command associated to the shortcut is executed.

Not sure how to fix it, I guess the only option is to check all shortcuts and actions first and accept input only if there's no confliction one.

And I do not see any reason why would we need #43888 for this, it is good to have it, but at least on macOS both Alts work the same.

@setanarut
Copy link
Contributor

setanarut commented Feb 22, 2022

Also there are illegal shortcuts for macOS (Godot 3.4.2 and alpha 3);
alt+1,alt+2,alt+3,alt+4 etc. ALT+... cannot be used for shortcuts other than text inputs. The ALT key is a key dedicated to text input.

LWScreenShot 2022-02-23 at 00 20 44

@ZX48developer
Copy link

Still present in alpha 4. This could lead on less testing on mac os. Try to program without @#[]{}|
I'm using a old linux machine to test godot 4 because it's not usable on mac os

@Calinou Calinou changed the title You can no longer enter in the editor a character that requires ALT + SHIFT You can no longer enter in the editor a character that requires ALT + SHIFT ([, ], \, …) Mar 13, 2022
@slasktotten
Copy link

I just ran into this on alpha 4 as well.

@dcerjan
Copy link

dcerjan commented Mar 26, 2022

Can confirm this also occurs on alpha 5 on Mac OS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment