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

CMD+K / CTRL+K Shortcut and inputs not always captured by command bar plugin #8

Open
3 of 4 tasks
Sebobo opened this issue Jan 14, 2023 · 8 comments
Open
3 of 4 tasks
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Sebobo
Copy link
Owner

Sebobo commented Jan 14, 2023

Issues:

  • Shortcut to open command bar not working properly inside guest frame.
  • CKEditor maps CMD+K to the link editor
  • Arrow navigation should work in input and when the dialog is focused
  • On Windows and Linux CTRL+K opens the search bar in the browser (this can be prevented somehow as other websites do that)
@Sebobo Sebobo added the bug Something isn't working label Jan 14, 2023
@Sebobo Sebobo added this to the v1 milestone Feb 7, 2023
@PRGfx
Copy link
Contributor

PRGfx commented Mar 14, 2023

Ctrl+K conflicts with focusing the address bar in chrome and firefox on Windows and Linux, so while the command bar opens, the focus is gone. If that can't be prevented, maybe the shortcut could be configurable?

@Sebobo
Copy link
Owner Author

Sebobo commented Mar 14, 2023

Oh thx for reporting the issue!
I had several testers, but apparently all were Mac users. I was quite sure that CTRL+L would be the focus of the address bar like CMD+L is on the Mac.
I wonder why all those command bar plugins then call themselves CMD+K 😔
Making it configurable wouldn't help much as the Neos backend will be used by a variety of users. I somehow must detect the available shortcut...

@Sebobo Sebobo self-assigned this Mar 14, 2023
@Sebobo
Copy link
Owner Author

Sebobo commented Mar 14, 2023

@PRGfx so which is the proper letter/key for this kind of action on Windows/Linux?

@PRGfx
Copy link
Contributor

PRGfx commented Mar 14, 2023

I'm not aware of a "common" practice for that, however coming from VSCode, Sublime Text and Chrome Dev-Tools I would expect Ctrl+Shift+P to open the command palette, which however also is a browser shortcut in chromium and firefox as far as I can tell..
Githubs preview-feature "Command Palette" also uses Ctrl+K and that works for me, so it seems to be possible to prevent a default.

@Sebobo
Copy link
Owner Author

Sebobo commented Mar 14, 2023

Yes I was just told that it can be prevented and several websites apparently do that. So I will do that now too ;)

@Sebobo
Copy link
Owner Author

Sebobo commented Mar 14, 2023

Hopefully resolved now, sadly cannot test it properly right now with my Windows VM

@PRGfx
Copy link
Contributor

PRGfx commented Mar 14, 2023

Unfortunately it doesn't seem fixed with 0.6.1 as far as I can tell.
I tried looking into this, but the parts changed in 9935282 are working on event.metaKey, which shouldn't trigger for Ctrl+K, so I can't really see where the Commandbar comes from..
(Trying to build it locally, the compiler was complaining about missing type declarations btw.)

@Sebobo Sebobo changed the title Shortcut and inputs not always captured by command bar plugin CMD+K / CTRL+K Shortcut and inputs not always captured by command bar plugin Mar 15, 2023
@Sebobo
Copy link
Owner Author

Sebobo commented Mar 15, 2023

OK, now with 0.7.2 at least this problem should be done.

The behaviour in the guest frame also improved a bit. The link editor still opens when inline editing, but another shortcut press will open the command bar, so there is a way to reach it. On MacOS Ctrl+K works fine though.
So not sure now whether and how to prevent the problem in CK. If users use the link hotkey then it would not be nice to prevent them from using it. So we could leave it like this for now and add a note to the readme ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants