[pitivi: 5/20] ui.controller.py: also set modifier state appropriately after keyboard events
- From: Edward Hervey <edwardrv src gnome org>
- To: svn-commits-list gnome org
- Subject: [pitivi: 5/20] ui.controller.py: also set modifier state appropriately after keyboard events
- Date: Wed, 15 Jul 2009 06:37:18 +0000 (UTC)
commit b4be9309c36b8712705ffcfdae0cebc75a153892
Author: Brandon Lewis <brandon_lewis berkeley edu>
Date: Tue Jul 7 00:07:04 2009 -0700
ui.controller.py: also set modifier state appropriately after keyboard events
pitivi/ui/controller.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/pitivi/ui/controller.py b/pitivi/ui/controller.py
index 5bc890d..c512567 100644
--- a/pitivi/ui/controller.py
+++ b/pitivi/ui/controller.py
@@ -139,12 +139,20 @@ class Controller(object):
def key_press_event(self, item, target, event):
self._event_common(item, target, event)
kv = event.keyval
+ if kv in (gtk.keysyms.Shift_L, gtk.keysyms.Shift_R):
+ self._shift_down = True
+ elif kv in (gtk.keysyms.Control_L, gtk.keysyms.Control_R):
+ self._control_down = True
return self.key_press(kv)
@handler(_view, "key_release_event")
def key_release_event(self, item, target, event):
self._event_common(item, target, event)
kv = event.keyval
+ if kv in (gtk.keysyms.Shift_L, gtk.keysyms.Shift_R):
+ self._shift_down = False
+ elif kv in (gtk.keysyms.Control_L, gtk.keysyms.Control_R):
+ self._control_down = False
return self.key_release(kv)
## internal callbacks
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]