antares icon indicating copy to clipboard operation
antares copied to clipboard

Keyboard Shortcuts not working on Mac

Open Zathire opened this issue 2 years ago • 9 comments

Keyboard Shorts don't appear to be working on MacOS.

Steps to reproduce the behavior:

  1. Open a DB Connection
  2. Open Multiple Tabs
  3. Press Command+W (Or whatever is configured on your version of Antares to close a Tab)
  4. Notice it doesn't work.

On Windows, I'm able to press Control+W to close a given tab. On MacOS, the command to do this in the settings is Command+w, however it doesn't work.

  • Running Antares Version 0.7.0 (0.7.0)
  • MacOS Ventura 13.4.1(c)

Zathire avatar Aug 01 '23 23:08 Zathire

Just tried version 0.7.15 also, same issue unfortunately.

Zathire avatar Aug 01 '23 23:08 Zathire

Same issue for 0.7.21

igrzhukovich avatar Feb 16 '24 08:02 igrzhukovich

Same issue for 0.7.22

SimonEscola avatar Mar 11 '24 11:03 SimonEscola

Sadly, I am currently unable to replicate and fix the problem because I do not have an Apple machine.

Fabio286 avatar Mar 11 '24 11:03 Fabio286

@Fabio286 I tested it on my Apple machine. It seems that the accelerator for hidden (visible: false) shortcuts does not work.

SimonEscola avatar Mar 12 '24 09:03 SimonEscola

There is an option in MenuItem called acceleratorWorksWhenHidden for exactly that case, sadly it doesn't seem to work. I will have a look at it, maybe there is a nice way to fix it. @Fabio286 what about integrating the shortcuts visibly in the menu bar on darwin?

SimonEscola avatar Mar 12 '24 14:03 SimonEscola

@Fabio286 what about integrating the shortcuts visibly in the menu bar on darwin?

It was hidden because this was happening #431

There is probably a way to fix the menu. Unfortunately unlike in the past I can't even virtualize macOS anymore. If you can do some testing and think you are on the right track go ahead and do a PR, I would be very grateful.

Fabio286 avatar Mar 13 '24 07:03 Fabio286

Hi @Fabio286 , I also have the same issue, I tested my update on #778 and it works. Instead of assigning a separate menu for each shortcut, I've consolidated them into one main menu. This adjustment ensures that the shortcut functions properly.

However, the menu don't use translation. I tried to use vue-i18n, but not work.

Here is the screenshot:

CleanShot 2024-03-13 at 15 54 08@2x

dyaskur avatar Mar 13 '24 08:03 dyaskur

@dyaskur and @SimonEscola thank you very much for the efforts!

However, the menu don't use translation. I tried to use vue-i18n, but not work.

Don't worry about that, I will find the way to send translated strings with the event objects to the main process.

Fabio286 avatar Mar 13 '24 10:03 Fabio286