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

Google Calendar making system error sounds when using keyboard shortcuts #145

Open
themkc opened this issue Dec 6, 2024 · 2 comments
Open
Labels
custom css/js Solved via extension system enhancement New feature or request help wanted Extra attention is needed

Comments

@themkc
Copy link

themkc commented Dec 6, 2024

I've got Google Calendar installed with the user agent spoofing as described here:
#89 (comment)

When I use keyboard shortcuts to navigate, e.g. "j" and "k" to move up or down a week/month, the MacOS error sound plays. However the keyboard shortcut does actually work and I am navigating the weeks/months correctly in Google Calendar.

Have tried reinstalling and this hasn't worked. I have also tested other Google web apps with keyboard shortcuts and can't seem to fix this.

@kofigumbs
Copy link
Owner

kofigumbs commented Dec 19, 2024

Hi, thanks for the report. I figured out a fix with Custom JS, but I think Multi can be improved so that it handles this kind of thing by default. Here's a script that will prevent that beeping for any letter key, unless you're also pressing Command:

window.addEventListener("keypress", (event) => {
  if (!event.ctrlKey && event.target === document.body && event.key.match(/[a-z]/))
    event.preventDefault()
})

The issue is that Google Calendar doesn't call event.preventDefault() for keypresses that it handles internally. GitHub also supports navigating with letter keys, but they seem to handle propagation properly, so Multi doesn't beep. By default macOS apps beep for any unhandled keypress (i.e. pressing "j" in Calendar), but I think it would be appropriate to override that behavior in Multi. Safari doesn't beep, and Tauri (a similar project I use for reference) also overrode it: tauri-apps/wry#448

I'm going to leave this issue open as a reminder to myself or as an invite for anyone wanting to contribute!

@kofigumbs kofigumbs added enhancement New feature or request help wanted Extra attention is needed custom css/js Solved via extension system labels Dec 19, 2024
@themkc
Copy link
Author

themkc commented Dec 19, 2024

Much appreciated. I wish I were able to help contribute but my product management experience unfortunately limits me to bug reports. Thanks a ton from Australia :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
custom css/js Solved via extension system enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants