[ease] [player] Support more keys for playback control.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease] [player] Support more keys for playback control.
- Date: Sat, 7 Aug 2010 05:14:19 +0000 (UTC)
commit 5b47c4f655d739d1201d341f9563a1791362c9e4
Author: Nate Stedman <natesm gmail com>
Date: Sat Aug 7 01:14:04 2010 -0400
[player] Support more keys for playback control.
ease-core/ease-enums.vala | 7 ++++++-
ease/ease-player.vala | 8 +++++---
2 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/ease-core/ease-enums.vala b/ease-core/ease-enums.vala
index a19b06e..2c2a0df 100644
--- a/ease-core/ease-enums.vala
+++ b/ease-core/ease-enums.vala
@@ -47,11 +47,16 @@ namespace Ease
*/
public enum Key
{
+ // arrow keys
UP = 65362,
DOWN = 65364,
LEFT = 65361,
RIGHT = 65363,
+
BACKSPACE = 65288,
- DELETE = 65535
+ DELETE = 65535,
+ ESCAPE = 0xff1b,
+ SPACE = 32,
+ ENTER = 65293,
}
}
diff --git a/ease/ease-player.vala b/ease/ease-player.vala
index 3905594..ff4abf8 100644
--- a/ease/ease-player.vala
+++ b/ease/ease-player.vala
@@ -208,19 +208,21 @@ internal class Ease.Player : Gtk.Window
/* Ask developers about the use of that file and the lack of doc */
debug ("Got a key press, keyval = %u", event.keyval);
switch (event.keyval) {
- case 0xff1b:
- // Escape
+ case Key.ESCAPE:
debug ("Quitting player.");
stage.hide ();
break;
case Key.RIGHT:
case Key.DOWN:
- // Right arrow
+ case Key.ENTER:
+ case Key.SPACE:
debug ("Advancing to next slide.");
advance ();
break;
case Key.LEFT:
case Key.UP:
+ case Key.BACKSPACE:
+ case Key.DELETE:
debug ("Retreating to previous slide");
retreat ();
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]