Skip to content

Commit f0dea76

Browse files
committed
docs: update keyboard shortcuts in installation guide and README - Changed default keyboard shortcuts from Option+Command to Option+Control for consistency across documentation and implementation.
1 parent d920747 commit f0dea76

5 files changed

Lines changed: 53 additions & 53 deletions

File tree

INSTALLATION_GUIDE.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ Mac Snap needs these permissions to function:
7070
### 1. Configure Global Hotkeys
7171

7272
Default hotkeys:
73-
- ` + ←` - Snap left half
74-
- ` + →` - Snap right half
75-
- ` + ↑` - Maximize window
76-
- ` + ↓` - Center window
73+
- `⌥⌃ + ←` - Snap left half
74+
- `⌥⌃ + →` - Snap right half
75+
- `⌥⌃ + ↑` - Maximize window
76+
- `⌥⌃ + ↓` - Center window
7777

7878
To customize:
7979
1. Open Mac Snap preferences

MacSnapper/Application/UseCases/WindowManagementUseCase.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -240,20 +240,20 @@ private extension WindowManagementUseCase {
240240
}
241241

242242
func getDefaultKeyboardShortcut(for snapType: SnapType) -> KeyboardShortcut? {
243-
// Define default keyboard shortcuts similar to Rectangle
243+
// Define default keyboard shortcuts using Option+Control
244244
switch snapType {
245245
case .leftHalf:
246-
return KeyboardShortcut(modifiers: [.command, .option], key: KeyEquivalent(""))
246+
return KeyboardShortcut(modifiers: [.option, .control], key: KeyEquivalent(""))
247247
case .rightHalf:
248-
return KeyboardShortcut(modifiers: [.command, .option], key: KeyEquivalent(""))
248+
return KeyboardShortcut(modifiers: [.option, .control], key: KeyEquivalent(""))
249249
case .topHalf:
250-
return KeyboardShortcut(modifiers: [.command, .option], key: KeyEquivalent(""))
250+
return KeyboardShortcut(modifiers: [.option, .control], key: KeyEquivalent(""))
251251
case .bottomHalf:
252-
return KeyboardShortcut(modifiers: [.command, .option], key: KeyEquivalent(""))
252+
return KeyboardShortcut(modifiers: [.option, .control], key: KeyEquivalent(""))
253253
case .maximize:
254-
return KeyboardShortcut(modifiers: [.command, .option], key: KeyEquivalent("f"))
254+
return KeyboardShortcut(modifiers: [.option, .control], key: KeyEquivalent("f"))
255255
case .center:
256-
return KeyboardShortcut(modifiers: [.command, .option], key: KeyEquivalent("c"))
256+
return KeyboardShortcut(modifiers: [.option, .control], key: KeyEquivalent("c"))
257257
default:
258258
return nil
259259
}

MacSnapper/Infrastructure/Services/GlobalHotkeyService.swift

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ public final class GlobalHotkeyService: ObservableObject {
3434
logger.info("Registering default hotkeys")
3535

3636
let defaultHotkeys: [(SnapType, UInt32, UInt32)] = [
37-
// Basic snapping with Option+Command
38-
(.leftHalf, 123, UInt32(optionKey | cmdKey)), // ⌥ + Left Arrow
39-
(.rightHalf, 124, UInt32(optionKey | cmdKey)), // ⌥ + Right Arrow
40-
(.topHalf, 126, UInt32(optionKey | cmdKey)), // ⌥ + Up Arrow
41-
(.bottomHalf, 125, UInt32(optionKey | cmdKey)), // ⌥ + Down Arrow
42-
(.maximize, 3, UInt32(optionKey | cmdKey)), // ⌥ + F
43-
(.maximize, 36, UInt32(optionKey | cmdKey)), // ⌥ + Enter (Return)
44-
(.center, 8, UInt32(optionKey | cmdKey)), // ⌥ + C
37+
// Basic snapping with Option+Control
38+
(.leftHalf, 123, UInt32(optionKey | controlKey)), // ⌥ + Left Arrow
39+
(.rightHalf, 124, UInt32(optionKey | controlKey)), // ⌥ + Right Arrow
40+
(.topHalf, 126, UInt32(optionKey | controlKey)), // ⌥ + Up Arrow
41+
(.bottomHalf, 125, UInt32(optionKey | controlKey)), // ⌥ + Down Arrow
42+
(.maximize, 3, UInt32(optionKey | controlKey)), // ⌥ + F
43+
(.maximize, 36, UInt32(optionKey | controlKey)), // ⌥ + Enter (Return)
44+
(.center, 8, UInt32(optionKey | controlKey)), // ⌥ + C
4545

4646
// Quarters
47-
(.topLeftQuarter, 18, UInt32(optionKey | cmdKey)), // ⌥ + 1
48-
(.topRightQuarter, 19, UInt32(optionKey | cmdKey)), // ⌥ + 2
49-
(.bottomLeftQuarter, 20, UInt32(optionKey | cmdKey)), // ⌥ + 3
50-
(.bottomRightQuarter, 21, UInt32(optionKey | cmdKey)) // ⌥ + 4
47+
(.topLeftQuarter, 18, UInt32(optionKey | controlKey)), // ⌥ + 1
48+
(.topRightQuarter, 19, UInt32(optionKey | controlKey)), // ⌥ + 2
49+
(.bottomLeftQuarter, 20, UInt32(optionKey | controlKey)), // ⌥ + 3
50+
(.bottomRightQuarter, 21, UInt32(optionKey | controlKey)) // ⌥ + 4
5151
]
5252

5353
for (snapType, keyCode, modifiers) in defaultHotkeys {
@@ -63,12 +63,12 @@ public final class GlobalHotkeyService: ObservableObject {
6363
logger.info("Registering premium hotkeys")
6464

6565
let premiumHotkeys: [(SnapType, UInt32, UInt32)] = [
66-
// Thirds with Option+Command
67-
(.leftThird, 12, UInt32(optionKey | cmdKey)), // ⌥ + Q
68-
(.centerThird, 13, UInt32(optionKey | cmdKey)), // ⌥ + W
69-
(.rightThird, 14, UInt32(optionKey | cmdKey)), // ⌥ + E
70-
(.leftTwoThirds, 0, UInt32(optionKey | cmdKey)), // ⌥ + A
71-
(.rightTwoThirds, 1, UInt32(optionKey | cmdKey)) // ⌥ + S
66+
// Thirds with Option+Control
67+
(.leftThird, 12, UInt32(optionKey | controlKey)), // ⌥ + Q
68+
(.centerThird, 13, UInt32(optionKey | controlKey)), // ⌥ + W
69+
(.rightThird, 14, UInt32(optionKey | controlKey)), // ⌥ + E
70+
(.leftTwoThirds, 0, UInt32(optionKey | controlKey)), // ⌥ + A
71+
(.rightTwoThirds, 1, UInt32(optionKey | controlKey)) // ⌥ + S
7272
]
7373

7474
for (snapType, keyCode, modifiers) in premiumHotkeys {
@@ -217,7 +217,7 @@ public final class GlobalHotkeyService: ObservableObject {
217217
let keyCode = event.keyCode
218218

219219
// Check if this matches any registered hotkeys
220-
if modifiers.contains([.option, .command]) {
220+
if modifiers.contains([.option, .control]) {
221221
let snapType = self.getSnapTypeForKeyCode(keyCode)
222222
if let snapType = snapType, self.registeredHotkeys.keys.contains(snapType) {
223223
self.logger.info("Local hotkey triggered for \(snapType.displayName)")
@@ -283,4 +283,4 @@ private struct Logger {
283283
func error(_ message: String) {
284284
print("❌ [\(category)] \(message)")
285285
}
286-
}
286+
}

MacSnapper/Presentation/Views/Settings/SnappingSettingsView.swift

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -283,35 +283,35 @@ extension SnapType {
283283
var defaultShortcut: String? {
284284
switch self {
285285
case .leftHalf:
286-
return ""
286+
return ""
287287
case .rightHalf:
288-
return ""
288+
return ""
289289
case .topHalf:
290-
return ""
290+
return ""
291291
case .bottomHalf:
292-
return ""
292+
return ""
293293
case .maximize:
294-
return "F"
294+
return "F"
295295
case .center:
296-
return "C"
296+
return "C"
297297
case .topLeftQuarter:
298-
return "1"
298+
return "1"
299299
case .topRightQuarter:
300-
return "2"
300+
return "2"
301301
case .bottomLeftQuarter:
302-
return "3"
302+
return "3"
303303
case .bottomRightQuarter:
304-
return "4"
304+
return "4"
305305
case .leftThird:
306-
return "Q"
306+
return "Q"
307307
case .centerThird:
308-
return "W"
308+
return "W"
309309
case .rightThird:
310-
return "E"
310+
return "E"
311311
case .leftTwoThirds:
312-
return "A"
312+
return "A"
313313
case .rightTwoThirds:
314-
return "S"
314+
return "S"
315315
case .custom, .minimize, .restore:
316316
return nil
317317
}

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,13 @@ cd MacSnap
237237
- **Focused Window**: Snap the currently active window without opening the main app
238238
- **Status Indicator**: Visual feedback on permission status
239239

240-
### Keyboard Shortcuts (Planned)
241-
- `Cmd+Opt+←`: Snap left half
242-
- `Cmd+Opt+→`: Snap right half
243-
- `Cmd+Opt+↑`: Snap top half
244-
- `Cmd+Opt+↓`: Snap bottom half
245-
- `Cmd+Opt+F`: Maximize window
246-
- `Cmd+Opt+C`: Center window
240+
### Keyboard Shortcuts
241+
- `⌥⌃+←`: Snap left half
242+
- `⌥⌃+→`: Snap right half
243+
- `⌥⌃+↑`: Snap top half
244+
- `⌥⌃+↓`: Snap bottom half
245+
- `⌥⌃+F`: Maximize window
246+
- `⌥⌃+C`: Center window
247247

248248
## 🧪 Testing
249249

0 commit comments

Comments
 (0)