[caribou] Support unicode key correctly.



commit a725f14fd3f0090e37df16a0949aa40774f0c23f
Author: Eitan Isaacson <eitan monotonous org>
Date:   Mon Jul 19 13:02:41 2010 -0700

    Support unicode key correctly.

 caribou/ui/keyboard.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/caribou/ui/keyboard.py b/caribou/ui/keyboard.py
index 3309d17..ae0f2a5 100644
--- a/caribou/ui/keyboard.py
+++ b/caribou/ui/keyboard.py
@@ -174,7 +174,7 @@ class Key(gtk.Button):
             if type(value) == str or type(value) == unicode:
                 value = value.decode('utf-8')
                 if len(value) == 1:
-                    self._value = ord(value)
+                    self._value = gtk.gdk.unicode_to_keyval(ord(value))
                 else:
                     key_value = gtk.gdk.keyval_from_name(value)
                     if key_value:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]