libpinyin / ibus-libpinyin

GNU General Public License v3.0
627 stars 90 forks source link

shift能分左右吗,左shift切大小写(主要是特殊符号切换),右shift切中英文。不知道新版本有没有?,ubuntu libpinyin版本1.11.1-3 #400

Open Riyuto opened 1 year ago

Riyuto commented 1 year ago

shift能分左右吗, 左shift切大小写(主要是特殊符号切换),右shift切中英文。 不知道新版本有没有?,ubuntu libpinyin版本1.11.1-3 左右shift占了中英切换,打符号的时候特不方便,多添加一个英文键盘,切中英文又特不方便。 不知道新版本有没有这功能,我下了最新源码编译不能通过, (需要ibus-1.0 > 1.15.1)? 源码编译不能识别到系统的ibus, 系统ibus是达到了版本要求的。不知道为什么识别不到

epico commented 1 year ago

好像还不支持区分 Shift 的左右键...

mozbugbox commented 3 months ago

看起来是有意隐藏了左右键的区别,用pinyin_accelerator_name() 替代了 gtk_accelerator_name()。大概是为了统一到 <Shift>上。

其实在比较 shortcut 和 key event 的时候特别处理一下,如果 shortcut 是那几个光板 Modifier,那么 <Shift> == <Shift_L> | <Shift_R> 也就可以了。

https://github.com/libpinyin/ibus-libpinyin/blob/f6c0271964fb821c800ef1a5c452dedc0c48b679/src/PYEngine.cc#L285-L345

mozbugbox commented 1 month ago

做了个临时补丁切换中英文,能凑合用。使用 Shift_R 或者 Super_L 之类的键切换中英文,不要加角括号(< >).

切换别的可能也行,不过就不能识别 <Shift>, <Control> 这种左右键通吃的热键设定了。

Issue #87

super-l-01.patch.txt