Skip to content

Commit

Permalink
fix fcitx5 Ctrl+Shift switches to rime and toggles ascii mode (#936)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored Sep 17, 2024
1 parent 24f0f7b commit 9fa2bbc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/rime/gear/ascii_composer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ ProcessResult AsciiComposer::ProcessKeyEvent(const KeyEvent& key_event) {
if (key_event.release()) {
if (shift_key_pressed_ || ctrl_key_pressed_) {
auto now = std::chrono::steady_clock::now();
if (now < toggle_expired_) {
if (((is_shift && shift_key_pressed_) ||
(is_ctrl && ctrl_key_pressed_)) &&
now < toggle_expired_) {
ToggleAsciiModeWithKey(ch);
}
shift_key_pressed_ = ctrl_key_pressed_ = false;
Expand Down

0 comments on commit 9fa2bbc

Please sign in to comment.