mirror of
https://github.com/nickshanks/ResKnife.git
synced 2024-08-29 22:28:57 +00:00
25 lines
420 B
Mathematica
25 lines
420 B
Mathematica
|
#import "NSEvent-ModifierKeys.h"
|
||
|
|
||
|
@implementation NSEvent (ModifierKeys)
|
||
|
|
||
|
+ (BOOL) isControlKeyDown
|
||
|
{
|
||
|
return (GetCurrentKeyModifiers() & controlKey) != 0;
|
||
|
}
|
||
|
|
||
|
+ (BOOL) isOptionKeyDown
|
||
|
{
|
||
|
return (GetCurrentKeyModifiers() & optionKey) != 0;
|
||
|
}
|
||
|
|
||
|
+ (BOOL) isCommandKeyDown
|
||
|
{
|
||
|
return (GetCurrentKeyModifiers() & cmdKey) != 0;
|
||
|
}
|
||
|
|
||
|
+ (BOOL) isShiftKeyDown
|
||
|
{
|
||
|
return (GetCurrentKeyModifiers() & shiftKey) != 0;
|
||
|
}
|
||
|
|
||
|
@end
|