Issue 115: 能否提供接口来定制中英文切换键呢?
http://code.google.com/p/ibus/issues/detail?id=115
Comment #1 by jhuangjiahua:
喜欢 Ctrl 切换中英文模式的多是原 fcitx 用户吧
临时先用这个 ibus-pinyin 补丁好了
diff --git a/engine/pinyin.py b/engine/pinyin.py
index 813eaeb..987e0d9 100644
--- a/engine/pinyin.py
+++ b/engine/pinyin.py
@@ -469,6 +469,11 @@ class PinYinEngine(ibus.EngineBase):
key.mask &= ~modifier.MOD2_MASK
# Match mode switch hotkey
+ if self.__match_hotkey(key, keysyms.Control_L,
modifier.CONTROL_MASK +
modifier.RELEASE_MASK) or \
+ self.__match_hotkey(key, keysyms.Control_R,
modifier.CONTROL_MASK +
modifier.RELEASE_MASK):
+ self.property_activate("status")
+ self.reset()
+ return True
if self.__match_hotkey(key, keysyms.Shift_L, modifier.SHIFT_MASK +
modifier.RELEASE_MASK) or \
self.__match_hotkey(key, keysyms.Shift_R, modifier.SHIFT_MASK +
modifier.RELEASE_MASK):
if self.__candidates and not self.__is_input_english() and
PinYinEngine.__shift_select_canidates:
Attachments:
ibus-pinyin_ctrl-mode-switch-hotkey.patch 888 bytes
--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "ibus-devel" group.
iBus project web page: http://code.google.com/p/ibus/
iBus dev group: http://groups.google.com/group/ibus-devel?hl=en
-~----------~----~----~----~------~----~------~--~---