Commit 29e2c8a4 authored by Benjamin Pracht's avatar Benjamin Pracht

* Transmit keyboard events from the arrow and enter key to the main...

* Transmit keyboard events from the arrow and enter key to the main controller, so that playlist navigation with the keyboard is possible.
* This doesn't conflict with dvd menu navigation.
* If these keys are set to an action that is handled by Cocoa, this action will have priority.

parent 477ffed0
...@@ -714,6 +714,13 @@ static VLCMain *_o_sharedMainInstance = nil; ...@@ -714,6 +714,13 @@ static VLCMain *_o_sharedMainInstance = nil;
case NSDeleteCharFunctionKey: case NSDeleteCharFunctionKey:
case NSBackspaceCharacter: case NSBackspaceCharacter:
return YES; return YES;
case NSUpArrowFunctionKey:
case NSDownArrowFunctionKey:
case NSRightArrowFunctionKey:
case NSLeftArrowFunctionKey:
case NSEnterCharacter:
case NSCarriageReturnCharacter:
return NO;
} }
val.i_int |= CocoaKeyToVLC( key ); val.i_int |= CocoaKeyToVLC( key );
......
...@@ -78,6 +78,12 @@ ...@@ -78,6 +78,12 @@
[[self delegate] deleteItem:self]; [[self delegate] deleteItem:self];
break; break;
case NSEnterCharacter:
case NSCarriageReturnCharacter:
[(VLCPlaylist *)[[VLCMain sharedInstance] getPlaylist]
playItem:self];
break;
default: default:
[super keyDown: o_event]; [super keyDown: o_event];
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment