Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/KeyboardWindow.py
diff options
context:
space:
mode:
authorNat <natcl@hotmail.com>2007-06-27 19:41:23 (GMT)
committer Nat <natcl@hotmail.com>2007-06-27 19:41:23 (GMT)
commit706d94ab1fe98caa7d93951bfbb7ec1138d8c1e5 (patch)
treed3c49a3232f8454940d24e9620c8d8132379f2f6 /Util/KeyboardWindow.py
parent0b943ca583da5e1e38079f112cf6c7c2d39032ce (diff)
Keyboard Window hide
Diffstat (limited to 'Util/KeyboardWindow.py')
-rw-r--r--Util/KeyboardWindow.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Util/KeyboardWindow.py b/Util/KeyboardWindow.py
index b421908..558ecc6 100644
--- a/Util/KeyboardWindow.py
+++ b/Util/KeyboardWindow.py
@@ -18,7 +18,6 @@ class KeyboardWindow(gtk.Window):
self.connect("key-press-event",self.handle_keypress)
self.connect("key-release-event",self.handle_keyrelease)
self.add_events(gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.ENTER_NOTIFY_MASK)
- self.connect("button-press-event",self.close)
self.connect("enter-notify-event",self.handle_enter)
self.size = size
@@ -101,7 +100,10 @@ class KeyboardWindow(gtk.Window):
self.move(pos[self.pos][0],pos[self.pos][1])
def handle_keypress(self,widget,event):
- self.btn_dic[event.hardware_keycode].set_fillcolor(random.random(),random.random(),random.random())
+ if event.hardware_keycode == 9:
+ self.hide_all()
+ else:
+ self.btn_dic[event.hardware_keycode].set_fillcolor(random.random(),random.random(),random.random())
def handle_keyrelease(self,widget,event):
self.btn_dic[event.hardware_keycode].set_fillcolor(0,0,0)