Post

Replies

Boosts

Views

Activity

How to handle cocoa arrow key events without warning sound?
Hi,First I tried - (void)keyDown:(NSEvent *) in a subclass of NSView, all other keys works but now arrow keys.I also tried addLocalMonitorForEventsMatchingMask, I can success captured arrow keys, but system warning with 'funk' sound when I press arrow key.[NSEvent addLocalMonitorForEventsMatchingMask:NSEventMaskKeyDown handler:^NSEvent * _Nullable(NSEvent * event) { //check if it is arrow key return event; }];- (BOOL)performKeyEquivalent:(NSEvent *)event { return YES;}I'm not able to find a answer from https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/EventOverview/HandlingKeyEvents/HandlingKeyEvents.html
1
0
1.1k
Jun ’18