From f65094c16e02bbfaabd28f0b58f75d5dd5130fa9 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Tue, 12 Feb 2008 13:15:39 +0000 Subject: [PATCH] * src/DisplayTabs/_ButtonTab.py: some accel keys don't work on keyboard with numlock as MOD_MASK2, enable the keys for those keyboards 2008-02-12 Benny Malengier svn: r10022 --- ChangeLog | 4 ++++ src/DisplayTabs/_ButtonTab.py | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e6f592557..dc580b203 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-02-12 Benny Malengier + * src/DisplayTabs/_ButtonTab.py: some accel keys don't work on keyboard + with numlock as MOD_MASK2, enable the keys for those keyboards + 2008-02-12 Benny Malengier * src/DisplayTabs/_EmbeddedList.py: allow to define middle click * src/Editors/_EditFamily.py: middle click on child calls edit child diff --git a/src/DisplayTabs/_ButtonTab.py b/src/DisplayTabs/_ButtonTab.py index fdec4b668..3ca767524 100644 --- a/src/DisplayTabs/_ButtonTab.py +++ b/src/DisplayTabs/_ButtonTab.py @@ -179,6 +179,7 @@ class ButtonTab(GrampsTab): the Edit button handler is called """ if event.type == gtk.gdk.KEY_PRESS: + print 'key pressed', event.keyval, event.state, gtk.gdk.MOD1_MASK, _RIGHT if event.keyval in (_RETURN, _KP_ENTER): try: self.edit_button_clicked(obj) @@ -193,13 +194,16 @@ class ButtonTab(GrampsTab): return self.add_button_clicked(obj) elif event.keyval in (_OPEN,) and self.share_btn and \ - event.state in (gtk.gdk.CONTROL_MASK,): + event.state in (gtk.gdk.CONTROL_MASK, + gtk.gdk.CONTROL_MASK | gtk.gdk.MOD2_MASK): self.share_button_clicked(obj) elif event.keyval in (_LEFT,) and \ - event.state in (gtk.gdk.MOD1_MASK,): + event.state in (gtk.gdk.MOD1_MASK, + gtk.gdk.MOD1_MASK | gtk.gdk.MOD2_MASK): self.prev_page() elif event.keyval in (_RIGHT,) and \ - event.state in (gtk.gdk.MOD1_MASK,): + event.state in (gtk.gdk.MOD1_MASK, + gtk.gdk.MOD1_MASK | gtk.gdk.MOD2_MASK): self.next_page() def add_button_clicked(self, obj):