stretchly
stretchly copied to clipboard
[Feature request]: block "command + Q" Shortcut during break.
Version
- [X] I'm using version 1.7.0
Existing requests
- [X] I've checked Existing requests
What operating system are you using?
macOS
Operating System Version
11.4 (20F71)
Problem description
When Break started, I can quite the break by "Command + Q" Shortcut, if we can block the "Command + Q" shortcut in Strict Mode, we can forced to have a rest.
Possible solution
When break start, register a global shortcut: "Command + Q" with empty callback, and unregister it when break complete.
Alternative solutions
Block keyboard event?
Additional information
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
I've tried to register the shortcut and it worked, but I am not sure about this, as it breaks the current behavior (of app other than Stretchly):
Let's say you run Signal and you do whatever in it. When break starts and you hit Cmd+Q
, Stretchly is not closed but Signal (as Stretchly is not taking focus). One has to first click on break window to Quit Stretchly with Cmd+Q
.
Other option would be to set Stretchly's app menu in a way that Cmd+Q
is not doing anything across the app. But then, in let's say Preferences, one could not quit app via it.
How to block command+Tab shortcut? it make stretchly looks like a lock screen application.
I am not sure whether that's possible as it is OS-level shortcut.
I've tried to register the shortcut and it worked, but I am not sure about this, as it breaks the current behavior (of app other than Stretchly):
Let's say you run Signal and you do whatever in it. When break starts and you hit
Cmd+Q
, Stretchly is not closed but Signal (as Stretchly is not taking focus). One has to first click on break window to Quit Stretchly withCmd+Q
.Other option would be to set Stretchly's app menu in a way that
Cmd+Q
is not doing anything across the app. But then, in let's say Preferences, one could not quit app via it.
According to my test, on my Mac, when the break starts, Stretchly preempts the Cmd+Q shortcut key, which is invalid in other applications.
According to my test, on my Mac, when the break starts, Stretchly preempts the Cmd+Q shortcut key, which is invalid in other applications.
@iwillhappy1314 can you explain? not sure what you mean.
breakWinLocal.on('close', (e) => {
if (settings.get('showBreaksAsRegularWindows')) {
if (!appIsQuitting && !breakWinLocal.fullScreen) {
e.preventDefault()
}
}
})