Skip to content

Commit 218e002

Browse files
nyanko3141592claude
andcommitted
fix: CustomKeyboardShortcut typealiasを削除しCore.KeyboardShortcutを直接使用
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f8f6262 commit 218e002

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

azooKeyMac/Windows/PromptInput/PromptInputView.swift

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ import Core
22
import Foundation
33
import SwiftUI
44

5-
// SwiftUI.KeyboardShortcutとの競合を避けるためtypealiasを定義
6-
typealias CustomKeyboardShortcut = Core.KeyboardShortcut
75

86
struct PromptInputView: View {
97
@State private var promptText: String = ""
@@ -627,14 +625,14 @@ struct PromptInputView: View {
627625
// MARK: - Shortcut Editor Sheet
628626
struct ShortcutEditorSheet: View {
629627
@State private var item: PromptHistoryItem
630-
@State private var shortcut: CustomKeyboardShortcut
628+
@State private var shortcut: Core.KeyboardShortcut
631629
@State private var hasShortcut: Bool
632630
let allItems: [PromptHistoryItem]
633631
let onSave: (PromptHistoryItem) -> Void
634632
let onCancel: () -> Void
635633

636634
// Reserved system shortcuts
637-
private var reservedShortcuts: [CustomKeyboardShortcut] {
635+
private var reservedShortcuts: [Core.KeyboardShortcut] {
638636
[
639637
Config.TransformShortcut().value // いい感じ変換のショートカット
640638
]
@@ -659,7 +657,7 @@ struct ShortcutEditorSheet: View {
659657

660658
init(item: PromptHistoryItem, allItems: [PromptHistoryItem], onSave: @escaping (PromptHistoryItem) -> Void, onCancel: @escaping () -> Void) {
661659
self._item = State(initialValue: item)
662-
self._shortcut = State(initialValue: item.shortcut ?? CustomKeyboardShortcut(key: "a", modifiers: .control))
660+
self._shortcut = State(initialValue: item.shortcut ?? Core.KeyboardShortcut(key: "a", modifiers: .control))
663661
self._hasShortcut = State(initialValue: item.shortcut != nil)
664662
self.allItems = allItems
665663
self.onSave = onSave

0 commit comments

Comments
 (0)