From 7d928f5a6cb5d3a16117805b7e1047b5ba932f0d Mon Sep 17 00:00:00 2001 From: Grayon Date: Sat, 23 Sep 2017 19:07:05 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BD=BF=E7=94=A8mpv=E5=BF=AB=E6=8D=B7?= =?UTF-8?q?=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Douyu/PlayerWindow.m | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Douyu/PlayerWindow.m b/Douyu/PlayerWindow.m index 9e9eb92..d0bec01 100644 --- a/Douyu/PlayerWindow.m +++ b/Douyu/PlayerWindow.m @@ -30,14 +30,6 @@ - (void)keyDown:(NSEvent*)event { } switch( [event keyCode] ) { - case 25:{ // 9 - [self handleKeyboardEvnet:event keyDown:YES]; - break; - } - case 29:{ // 0 - [self handleKeyboardEvnet:event keyDown:YES]; - break; - } case 53:{ // Esc key [self toggleFullScreen:self]; break; @@ -52,6 +44,7 @@ - (void)keyDown:(NSEvent*)event { break; } default:{ + [self handleKeyboardEvnet:event keyDown:YES]; break; } } @@ -69,7 +62,6 @@ - (void)handleKeyboardEvnet:(NSEvent *)event keyDown:(BOOL)keyDown { } const char *keyState = keyDown?"keydown":"keyup"; NSString *str = [self stringByKeyEvent:event]; - const char *args[] = {keyState, [str UTF8String], NULL}; mpv_command_async(vc.mpv, 0, args); }