kaiserdj / Darkorbit-client

Open source darkorbit client (cross-platform and with better performance)
GNU Affero General Public License v3.0
95 stars 23 forks source link

Shortcuts are hooked when not in focus #8

Closed Ionic97 closed 3 years ago

Ionic97 commented 3 years ago

The keyboard shortcuts in 2.1.1 are hooked, even when the application is not in focus. This prevents the use of F5, Ctrl ++ and Ctrl +- while the client is open. Could an exception be implemented to check for window focus or mouse hover etc?

Also thank you very much for the last update :) You're doing pretty fast work on here.

kaiserdj commented 3 years ago

The problem is that the native api of electron is globalShortcut.

Note from api:

Note: The shortcut is global; it will work even if the app does not have the keyboard focus. This module cannot be used before the ready event of the app module is emitted.

What I will do is change from globalShortcut to web APIs, so it does not block other applications and only acts when it has focus

kaiserdj commented 3 years ago

With this change it should be fixed.

If you have problems again, reopen the issue

Thank you very much for telling me the problem ❤️