fix(app): replace stock new-window item so ⌘N fires new post alone
CommandGroup(after: .newItem) left the WindowGroup's stock File ▸ New Window item in place with its ⌘N, so both actions fired — a second Museion window AND a new post. Switching to replacing: .newItem kills the stock item: the app stays single-window and ⌘N belongs to New Post alone. Update the AGENTS.md contract, NewPostButton doc, and the kiosk ⌘W/⌘N key-swallow comments to match the new menu reality.
This commit is contained in:
1 parent
7ed9b41256
commit
d305f822aa
3 files changed
+12
-9
No files matched your search
@@ -281,8 +281,9 @@ enum WritingLockKiosk {
|
||||
/// dependent — a Cyrillic ⌘W or a caps-on "W" slipped past while the
|
||||
/// stock Close still fired, wedging a windowless kiosk. 13 =
|
||||
/// kVK_ANSI_W (⌘W close), 3 = kVK_ANSI_F (⌃⌘F fullscreen), 45 =
|
||||
/// kVK_ANSI_N (⌘N — the stock File ▸ New Window item SwiftUI owns
|
||||
/// stays enabled mid-lock; a second window would strand the count).
|
||||
/// kVK_ANSI_N (⌘N — New Post; the stock New Window item is replaced
|
||||
/// and New Post disables mid-lock, the swallow keeps the kiosk
|
||||
/// absolute regardless of menu state).
|
||||
nonisolated static func refusesKey(keyCode: UInt16, characters: String?, modifiers: NSEvent.ModifierFlags) -> Bool {
|
||||
let exact = modifiers.intersection([.command, .control, .option, .shift])
|
||||
let key = characters?.lowercased()
|
||||
|
||||
Reference in new issue
Block a user