Ctrl from non-ctrl key doesn't work?
tamo opened this issue · comments
I have a jp106 keyboard with
Option "XkbOptions" "ctrl:nocaps"
in my xorg.conf. So I use capslock as ctrl.
Both capslock+space and ctrl+space turn on/off ibus.
But only ctrl+j turns on hiragana mode of ibus-skk.
Capslock+j doesn't turn on hiragana, but the termial receives ctrl+j directly.
If this is a bug not in ibus-skk but in ibus, please ignore.
Thanks.
I'm using a jp106 keyboard with the same setting, but I can't reproduce the issue with:
- ibus-skk git master & ibus-1.3.7-1 on Debian sid
- ibus-skk git master & ibus-1.3.7-1, which includes recent xkb patch[1] and some other fixes, on Fedora 13
Perhaps your ibus version is older?
No, I'm using iBus-1.3.7 on OpenBSD.
But okay, this doesn't seem to be ibus-skk's fault because you can't reproduce it.
Turned out that my keyboard returns "ctrl+J" (not "ctrl+j") when I press CapsLock+j.
Rewriting skk.py (s/ctrl+j/ctrl+J/g) solved my problem.
I don't know whether any other systems have the same problem.
If you think it is worthwhile, use lower keychr for the "ctrl+" case in engine.py.
... or skk.py
--- engine/skk.py~ Sat Oct 9 15:02:42 2010
+++ engine/skk.py Sat Oct 9 15:29:09 2010
@@ -1048,7 +1048,7 @@
self.__keystr = keystr
self.__is_ctrl = keystr.startswith(u'ctrl+')
if self.__is_ctrl:
- keystr = keystr[5:]
+ keystr = keystr[5:].lower()
+ self.__keystr = self.__keystr.lower()
self.__keyval = keystr
if Key.__letters.has_key(keystr.lower()):
Thank you! 4b4a23b