Skip to content

Commit

Permalink
use Shift+Tab to switch buffered mode when code length equals 1
Browse files Browse the repository at this point in the history
  • Loading branch information
dsl committed May 18, 2023
1 parent d50cf0c commit 0351aa5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/rime/gear/ascii_composer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,14 @@ ProcessResult AsciiComposer::ProcessKeyEvent(const KeyEvent& key_event) {

if (!ascii_mode && is_sbxlm && len == 1 && islower(c1) && ch == XK_Tab ) {
if (!key_event.release()) {
SwitchAsciiMode(true, kAsciiModeSwitchInline);
return kAccepted;
if (key_event.shift()) {
ctx->set_option("is_buffered", !ctx->get_option("is_buffered"));
return kAccepted;
}
else {
SwitchAsciiMode(true, kAsciiModeSwitchInline);
return kAccepted;
}
}
}

Expand Down

0 comments on commit 0351aa5

Please sign in to comment.