mirror of
https://github.com/nickshanks/ResKnife.git
synced 2025-01-06 23:30:09 +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
|