File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 18
18
@interface SSYEventInfo : NSObject {
19
19
}
20
20
21
- + (BOOL )alternateKeyDown ;
22
-
23
- + (BOOL )shiftKeyDown ;
21
+ + (BOOL )alternateKeyDown ;
22
+ + (BOOL )shiftKeyDown ;
23
+ + (BOOL )commandKeyDown ;
24
+ + (BOOL )controlKeyDown ;
24
25
25
26
@end
Original file line number Diff line number Diff line change @@ -13,4 +13,14 @@ + (BOOL)shiftKeyDown {
13
13
return (modifiers & kCGEventFlagMaskShift ) != 0 ;
14
14
}
15
15
16
+ + (BOOL )commandKeyDown {
17
+ CGEventFlags modifiers = (CGEventFlags )CGEventSourceFlagsState (kCGEventSourceStateCombinedSessionState ) ;
18
+ return (modifiers & kCGEventFlagMaskCommand ) != 0 ;
19
+ }
20
+
21
+ + (BOOL )controlKeyDown {
22
+ CGEventFlags modifiers = (CGEventFlags )CGEventSourceFlagsState (kCGEventSourceStateCombinedSessionState ) ;
23
+ return (modifiers & kCGEventFlagMaskControl ) != 0 ;
24
+ }
25
+
16
26
@end
You can’t perform that action at this time.
0 commit comments