From 71fa48c6aeae129297a1c430d6187735c61828d6 Mon Sep 17 00:00:00 2001 From: fujiwarat Date: Tue, 7 May 2013 12:16:12 +0900 Subject: Fixed unichr range (#957222) --- engine/engine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'engine/engine.py') diff --git a/engine/engine.py b/engine/engine.py index d90f62f..b9d2642 100644 --- a/engine/engine.py +++ b/engine/engine.py @@ -1851,7 +1851,8 @@ class Engine(IBus.EngineSimple): @staticmethod def _mk_key(keyval, state): if state & (IBus.ModifierType.CONTROL_MASK | IBus.ModifierType.MOD1_MASK): - if unichr(keyval) in u'!"#$%^\'()*+,-./:;<=>?@[\]^_`{|}~': + if keyval < 0xff and \ + unichr(keyval) in u'!"#$%^\'()*+,-./:;<=>?@[\]^_`{|}~': state |= IBus.ModifierType.SHIFT_MASK elif IBus.KEY_a <= keyval <= IBus.KEY_z: keyval -= (IBus.KEY_a - IBus.KEY_A) -- cgit v1.2.1