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

Chorus steals "meta" key presses, disabling browser shortcuts #397

Open
mattmattmatt opened this issue Apr 13, 2020 · 0 comments
Open

Chorus steals "meta" key presses, disabling browser shortcuts #397

mattmattmatt opened this issue Apr 13, 2020 · 0 comments
Assignees

Comments

@mattmattmatt
Copy link

Bug report

Describe the bug

Here is a clear and concise description of what the problem is:

On OS X (Mac) in Chrome, users can use e.g. CMD + 1 to switch to the first open tab in the current window. The keyboard shortcut handling implementation in Chorus inadvertently disables this feature by allowing the Cmd key press to pass but capturing the 1 key press.

Expected Behavior

Here is a clear and concise description of what was expected to happen:

Pressing Cmd + 1 in Chorus switches from the current tab to the first open browser tab.

Actual Behavior

The key press is captured and event.preventDefault() applied, resulting in no tab switch.

Possible Fix

Don't capture/event.preventDefault() keys when they are occurring while a "meta" key is pressed.
I have fixed it locally in this line

if kodiControl or remotePage
e.preventDefault()

by extending it to include

      if ((kodiControl || remotePage) && !e.metaKey) {
        e.preventDefault();
      }

Your Environment

Used Operating system:

  • Used browser(s): Chrome 80
  • Operating system version/name: OS X 10.14.6
  • Kodi version and platform: LibreELEC 9.2.0, Kodi 18.5 (Leia)
  • Chorus2 version: 8.x-2.4.6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants