mirror of
https://github.com/aseprite/aseprite.git
synced 2025-02-15 21:40:34 +00:00
Use NSWindow noResponseFor: to avoid beeps on Skia/OSX fork
This commit is contained in:
parent
df9c555c87
commit
8e06d61f74
@ -131,9 +131,7 @@ bool is_key_pressed(KeyScancode scancode)
|
||||
|
||||
- (void)keyDown:(NSEvent*)event
|
||||
{
|
||||
#if 0 // Avoid beeps TODO comment this when the OS X menus are ready
|
||||
[super keyDown:event];
|
||||
#endif
|
||||
|
||||
KeyScancode scancode = cocoavk_to_scancode(event.keyCode);
|
||||
if (scancode >= 0 && scancode < kKeyScancodes)
|
||||
@ -155,9 +153,7 @@ bool is_key_pressed(KeyScancode scancode)
|
||||
|
||||
- (void)keyUp:(NSEvent*)event
|
||||
{
|
||||
#if 0
|
||||
[super keyUp:event];
|
||||
#endif
|
||||
|
||||
KeyScancode scancode = cocoavk_to_scancode(event.keyCode);
|
||||
if (scancode >= 0 && scancode < kKeyScancodes)
|
||||
|
@ -1,5 +1,5 @@
|
||||
// SHE library
|
||||
// Copyright (C) 2012-2015 David Capello
|
||||
// Copyright (C) 2012-2016 David Capello
|
||||
//
|
||||
// This file is released under the terms of the MIT license.
|
||||
// Read LICENSE.txt for more information.
|
||||
@ -158,4 +158,14 @@ using namespace she;
|
||||
return (nsCursor != nil ? YES: NO);
|
||||
}
|
||||
|
||||
- (void)noResponderFor:(SEL)eventSelector
|
||||
{
|
||||
if (eventSelector == @selector(keyDown:)) {
|
||||
// Do nothing (avoid beep)
|
||||
}
|
||||
else {
|
||||
[super noResponderFor:eventSelector];
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
Loading…
x
Reference in New Issue
Block a user