Skip to content

Commit

Permalink
Made the KeyEquivalent extension available on iOS again
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikmayer committed Dec 29, 2024
1 parent d07212c commit c86b279
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/KeyboardShortcuts/Utilities.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import SwiftUI

#if os(macOS)
import Carbon.HIToolbox
import SwiftUI


extension String {
Expand Down Expand Up @@ -507,7 +508,9 @@ extension Dictionary {
index(forKey: key) != nil
}
}
#endif

@available(iOS 14.0, *)
@available(macOS 11.0, *)
extension KeyEquivalent {
init?(unicodeScalarValue value: Int) {
Expand All @@ -518,7 +521,6 @@ extension KeyEquivalent {
self = KeyEquivalent(character)
}
}
#endif


extension Sequence where Element: Hashable {
Expand Down

0 comments on commit c86b279

Please sign in to comment.