Fixes Shift key switch issue

This commit is contained in:
Peng Wu 2020-09-27 10:43:49 +08:00
parent 65a1a96721
commit 3ccdd30a9a
2 changed files with 28 additions and 2 deletions

View File

@ -0,0 +1,23 @@
commit 2ee257c73388df89b4f5966c882d8047a896f9b2
Author: Peng Wu <alexepico@gmail.com>
Date: Fri Aug 28 11:30:31 2020 +0800
restore mainSwitch shortcut key
diff --git a/src/PYPPinyinEngine.cc b/src/PYPPinyinEngine.cc
index dcd2e3f..295adc5 100644
--- a/src/PYPPinyinEngine.cc
+++ b/src/PYPPinyinEngine.cc
@@ -166,8 +166,10 @@ PinyinEngine::processAccelKeyEvent (guint keyval, guint keycode,
* and no other key event between the press and release key event */
gboolean triggered = FALSE;
- if (PinyinConfig::instance ().mainSwitch () == accel) {
- triggered = TRUE;
+ if (m_prev_pressed_key == keyval) {
+ if (PinyinConfig::instance ().mainSwitch () == accel) {
+ triggered = TRUE;
+ }
}
if (triggered) {

View File

@ -1,8 +1,8 @@
%global snapshot 0
%global snapshot 1
Name: ibus-libpinyin
Version: 1.11.93
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Intelligent Pinyin engine based on libpinyin for IBus
License: GPLv3+
URL: https://github.com/libpinyin/ibus-libpinyin
@ -88,6 +88,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/ibus-setup-libbopo
%{_datadir}/ibus/component/*
%changelog
* Sun Sep 27 2020 Peng Wu <pwu@redhat.com> - 1.11.93-2
- Fixes Shift key switch issue
* Wed Aug 26 2020 Peng Wu <pwu@redhat.com> - 1.11.93-1
- Update to 1.11.93
- switch to use GPLv3+ license