@@ -6,15 +6,15 @@ public protocol CGEventObserverType {
66 @discardableResult
77 func activateIfPossible( ) -> Bool
88 func deactivate( )
9- var stream : AsyncStream < CGEventType > { get }
9+ var stream : AsyncStream < CGEvent > { get }
1010 var isEnabled : Bool { get }
1111}
1212
1313final class CGEventObserver : CGEventObserverType {
14- let stream : AsyncStream < CGEventType >
14+ let stream : AsyncStream < CGEvent >
1515 var isEnabled : Bool { port != nil }
1616
17- private var continuation : AsyncStream < CGEventType > . Continuation
17+ private var continuation : AsyncStream < CGEvent > . Continuation
1818 private var port : CFMachPort ?
1919 private let eventsOfInterest : Set < CGEventType > = [
2020 . keyUp,
@@ -33,7 +33,7 @@ final class CGEventObserver: CGEventObserverType {
3333 }
3434
3535 init ( ) {
36- var continuation : AsyncStream < CGEventType > . Continuation !
36+ var continuation : AsyncStream < CGEvent > . Continuation !
3737 stream = AsyncStream { c in
3838 continuation = c
3939 }
@@ -71,9 +71,9 @@ final class CGEventObserver: CGEventObserverType {
7171 }
7272
7373 if let continuation = continuationPointer?
74- . assumingMemoryBound ( to: AsyncStream < CGEventType > . Continuation. self)
74+ . assumingMemoryBound ( to: AsyncStream < CGEvent > . Continuation. self)
7575 {
76- continuation. pointee. yield ( eventType )
76+ continuation. pointee. yield ( event )
7777 }
7878
7979 return . passRetained( event)
0 commit comments