24 lines
814 B
Diff
24 lines
814 B
Diff
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) {
|