Skip to content

Commit

Permalink
Merge pull request #351 from bartreardon/more-banned-shortcut-keys
Browse files Browse the repository at this point in the history
Added N and M as banned keys.
  • Loading branch information
erikng committed Apr 28, 2022
2 parents 2b80cb8 + 44cb06e commit 243a5a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Nudge/UI/Main.swift
Expand Up @@ -67,6 +67,16 @@ class AppDelegate: NSObject, NSApplicationDelegate {
let msg = "Nudge detected an attempt to close the application via CMD + W shortcut key."
uiLog.warning("\(msg, privacy: .public)")
return true
// Disable CMD + N - closes the Nudge window and breaks it
case [.command] where event.characters == "n":
let msg = "Nudge detected an attempt to create a new window via CMD + N shortcut key."
uiLog.warning("\(msg, privacy: .public)")
return true
// Disable CMD + M - closes the Nudge window and breaks it
case [.command] where event.characters == "m":
let msg = "Nudge detected an attempt to minimise the application via CMD + M shortcut key."
uiLog.warning("\(msg, privacy: .public)")
return true
// Disable CMD + Q - fully closes Nudge
case [.command] where event.characters == "q":
let msg = "Nudge detected an attempt to close the application via CMD + Q shortcut key."
Expand Down

0 comments on commit 243a5a7

Please sign in to comment.