dteoh / SlowQuitApps

Add a global delay to Command-Q to stop accidental app quits.
GNU General Public License v2.0
1.17k stars 55 forks source link

Mute app sound #45

Open kuznetsov-from-wonderland opened 5 years ago

kuznetsov-from-wonderland commented 5 years ago

Dear developer! I like this app - this helps me in everyday life. Are there any options to mute the sound? Be default, when I close an app - it plays for me a Bosso sound from default user-interface-sounds. But this is kind annoying. I can mute all system sounds with F10 on keyboard - but this is not the way for me)

kuznetsov-from-wonderland commented 5 years ago
screenshot 2018-11-09 at 08 17 32
dteoh commented 5 years ago

That is very strange. There is no code in SQA that intentionally plays a sound. I have not heard that sound effect go off before...

pendletong commented 5 years ago

It only seems to do it on certain applications. Twitterrific, ImageOptim and OpenEmu seems to do it for me. If you hold Command+Q down it starts by making the sound and then, with a second pause, it starts the constant repeated beginning of the sound. (This is basically the sound that occurs when input is not accepted, an example of this being if you hold a key down in Disk Utility). I have a video with the sound happening but don't seem to be able to upload it.

dnblankedelman commented 5 years ago

So, I have also seen this behavior. My best guess is that instead of SQA successfully trapping the keypresses in some situations and not passing them on to the underlying app, the app receives a bunch of "Qs" it doesn't know how to handle and hence repeatedly beeps (thanks to the keyboard autorepeat).

JayBrown commented 5 years ago

We've already had this here, and it has continued on to Mojave (using v0.6.0). I'm getting the constant alert sound e.g. in Nimble Commander and BBEdit, but not in Firefox, iTerm, Mail.

The only solution currently is to revert back to v0.5.0, even on Mojave.

JayBrown commented 5 years ago

Addendum: Apple Mail now also with the alert sound, and Firefox has one short alert sound at the end right before actually quitting. So this needs to be addressed.

dteoh commented 5 years ago

Okay, I finally am able to reproduce this on demand. I tend to press and hold "Cmd" first, then "Q", so I don't hear anything.

If I do the reverse "Q" then "Cmd", I can make the beep sound appear.

Sounds similar to #43.

JayBrown commented 5 years ago

I have to add that this is how I press CMD-Q too: first press & hold CMD, then shortly afterwards Q, and then hold both. And the alert sounds also occur when doing it in this order. (Not with v0.5.0, though.)

dteoh commented 5 years ago

Please give v0.7.0 a go, it might fix this issue...

JayBrown commented 5 years ago

Sorry to inform you that the constant alert sound while quitting still happens, e.g. when quitting Firefox, iTerm etc.

dteoh commented 5 years ago

I cannot reproduce this anymore, I suspect that there might be some interference with other global key bindings or some issue particular to the local setup.

JayBrown commented 5 years ago

This only seems to happen when the application in question (Firefox, iTerm etc.) has no open Windows. I.e. if you have a Firefox window or iTerm window open, and you press CMD-Q, the alert sound doesn't occur. If you close the windows, and the app is still active, and when you then press CMD-Q, then the alert sounds occur. (It doesn't seem to occur when all windows are minimized.)

Maybe that can help you in finding the bug.

JayBrown commented 5 years ago

But overall, the behavior is rather erratic… sometimes the system (the apps) behave as described above, then at some point it's different again, sometimes only for a short time.

JayBrown commented 5 years ago

With applications that only come with one window, i.e. applications that automatically quit, when you close the single window, like Apple News, the alert sound always occurs. Funny thing: if you launch Apple News, then CMD-Q, then alert sounds. But if you open Apple News preferences, then you will have two windows, and if you then press CMD-Q, the alert sound doesn't occur.

JayBrown commented 5 years ago

I'm always getting an "invalid event source" error from SlowQuitApps, sometimes accompanied by alert sounds, sometimes not.

snap

JayBrown commented 5 years ago

This is the error log, when the alert sounds happen with Firefox:

error   17:23:21.208854 +0100   SlowQuitApps    invalid event source
default 17:23:21.216165 +0100   systemsoundserverd  687: -> Incoming Request : actionID 4096, inClientPID 1579(firefox), inBehavior 1, customVibeDataProvided 0, loop 0, loopPeriod 0.000000, inFlags 0, inClientCompletionToken 3
default 17:23:21.216558 +0100   systemsoundserverd  203: Data was marked NON-purgeable for actionID: 4096; this: 0x7fd3dbf08270
default 17:23:21.216718 +0100   systemsoundserverd  995: -> Starting audio : actionID 4096, volume 0.606531 (user vol 0.606531, client vol scalar 1.000000, CM vol 1.000000), pan 0.000000
error   17:23:21.222052 +0100   SlowQuitApps    invalid event source
error   17:23:21.239499 +0100   SlowQuitApps    invalid event source
error   17:23:21.254781 +0100   SlowQuitApps    invalid event source
default 17:23:21.457599 +0100   systemsoundserverd  50: Calling completion proc for token 172, this 0x7fd3dcf0af70
default 17:23:21.457676 +0100   systemsoundserverd  238: Audio completed for mActionID 4096, token 172, elapsed time 241
default 17:23:21.457720 +0100   systemsoundserverd  279: System sound finished playing, mActionID 4096, token 172, total time 241 ms
default 17:23:21.457902 +0100   systemsoundserverd  316: Number of active sounds remaining 1
default 17:23:21.457942 +0100   systemsoundserverd  329: ------Currently playing system sounds------
default 17:23:21.458058 +0100   systemsoundserverd  90: token 120, mActionID 24, process 19263(), mClientConnection -595583072, mPlayerSynchronizer 0x0, mPlayFlags->ShouldPlayAudio 1, mPlayFlags->ShouldVibe 0, mAudioFinishedPlaying 0, mVibeFinishedPlaying 0, mIsLoopedSound 0, mClientCompletionToken 1, timeSinceClientRequestedStopInMS 0, elapsedTimeInMS 10583343
default 17:23:21.458101 +0100   systemsoundserverd  333: -------------------------------------------
JayBrown commented 5 years ago

Still happens on v0.7.1

anugupta commented 5 years ago

Some additional info – this happens to me when I'm running BetterTouchTools.

If I quit BTT, then I no longer get the Basso beep when cmd-q from apps.

JayBrown commented 5 years ago

This could be the reason. You first have to quit both BTT and then SlowQuitApps, the latter with osascript -e 'tell application "SlowQuitApps" to quit', then relaunch SlowQuitApps. Then the macOS alert sound will be gone. But I need to test this for a couple of hours without BTT.

When I didn't quit & relaunch SlowQuitApps, then I still got the alert sound.

JayBrown commented 5 years ago

Nope. Just opened another app, and got the alert sound too, even with BTT disabled. Then I waited a couple of seconds, and then the alert sound was gone (same app). So I'm not sure if it's BTT. Seems to be very erratic/chaotic behavior on SQA's part, and it's impossible to pinpoint the exact reason.

Back to version 0.5.0.

JayBrown commented 5 years ago

I may have narrowed it down a little bit. Version 0.7.2 is working fine for at least a minute or so, but then the alert sounds return, sometimes faster when I open another app after launching SQA, e.g. the aforementioned BBEdit. When I then quit SQA with osascript and relaunch it, then everything is fine again, but only for a short period. v0.5.0 keeps working fine, though it might break on Catalina… not sure. (Tested on Mojave 10.14.5.)

cameronsstone commented 5 years ago

FYI: I'm on 0.7.3 and I get the sound occasionally. I just got it in firefox immediately after coming out of sleep, but then it stopped after a few seconds/represses...

nassi commented 4 years ago

I love the app, but I too am getting the obnoxious beep. I also believe the app is not "swallowing" the command-Q, but passing it along. So if it's passing it to the Finder, you get the beep.

JayBrown commented 4 years ago

In my case, Finder isn't even running. :scratch-head:

nassi commented 4 years ago

The beep is intermittent. I've tried it with/without Finder running, with/without other apps.

lucianodinapoli commented 4 years ago

Perhaps this could be solved with the other feature suggestion: press cmd+Q once, the timer comes up and it can be cancelled with ESC. This way we won't be holding the keys and there won't be any obnoxious sounds or errors.

nassi commented 4 years ago

This could work. But isn’t there a way to just swallow the cmd+Q and not pass it on?


Ike Nassi

email: nassi@nassi.com mobile: +1-408-390-8281 web: http://www.nassi.com

On Apr 8, 2020, at 3:06 AM, lucianodinapoli notifications@github.com wrote:

Perhaps this could be solved with the other feature suggestion: press cmd+Q once, the timer comes up and it can be cancelled with ESC. This way we won't be holding the keys and there won't be any obnoxious sounds or errors.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dteoh/SlowQuitApps/issues/45#issuecomment-610870329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQY6LFYS4M27A4OMJLP4LLRLREBNANCNFSM4GCX5JJA.

jvlobo commented 4 years ago

This is happening to me also now since I updated it from version 0.2.1 as specified here: https://github.com/dteoh/SlowQuitApps/issues/77

It is not happening every time so I'm not too sure what's the actual way of reproducing the issue. I guess it was not happening before because I didn't need to keep Q pressed.

Here you can see how I reproduce it by opening WhatsApp: https://drive.google.com/file/d/1h9qJ9ubnV74gVq9KZUr1REeueMwnDR0J/view?usp=sharing

lucianodinapoli commented 4 years ago

This is happening to me also now since I updated it from version 0.2.1 as specified here: #77

It is not happening every time so I'm not too sure what's the actual way of reproducing the issue. I guess it was not happening before because I didn't need to keep Q pressed.

Here you can see how I reproduce it by opening WhatsApp: https://drive.google.com/file/d/1h9qJ9ubnV74gVq9KZUr1REeueMwnDR0J/view?usp=sharing

How do you close apps without holding cmd + Q then? That is the whole point of the SlowQuitApps...

nassi commented 4 years ago

I use Keyboard Maestro. I redefine ⌘-Q in the keyboard prefs to ^ ⌘ ⇧ Q and I trip ⌘Q using a KM Hot Key trigger


Ike Nassi

email: nassi@nassi.com mobile: +1-408-390-8281 web: http://www.nassi.com

On Jun 29, 2020, at 1:55 AM, lucianodinapoli notifications@github.com wrote:

This is happening to me also now since I updated it from version 0.2.1 as specified here: #77 https://github.com/dteoh/SlowQuitApps/issues/77 It is not happening every time so I'm not too sure what's the actual way of reproducing the issue. I guess it was not happening before because I didn't need to keep Q pressed.

Here you can see how I reproduce it by opening WhatsApp: https://drive.google.com/file/d/1h9qJ9ubnV74gVq9KZUr1REeueMwnDR0J/view?usp=sharing https://drive.google.com/file/d/1h9qJ9ubnV74gVq9KZUr1REeueMwnDR0J/view?usp=sharing How do you close apps without holding cmd + Q then? That is the whole point of the SlowQuitApps...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dteoh/SlowQuitApps/issues/45#issuecomment-651027554, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQY6LAKREVBNLYPNATN333RZBJIFANCNFSM4GCX5JJA.

JayBrown commented 4 years ago

For those of you still encountering this bug: I have switched to CommandQ by Tyler Hall, and it's working fine on macOS 10.15.6. You need to invest $12, however. (Also comes with a delayed [CMD]-[SHIFT]-W when closing windows.)