diff --git a/README.md b/README.md index 5c0dab8..b2004fc 100644 --- a/README.md +++ b/README.md @@ -20,11 +20,12 @@ and a GTK 3 module. Only a plain `Ctrl` chord is a strans key: with `Shift`, `Alt` or `Super` held it commits what is pending and goes to the application, so -`Ctrl+Shift+V` still pastes. The mode switched to — `한`, `あ`, `ア`, `ă`, -`A` — shows in the popup until the next key. A Korean keyboard's 한/영 and -한자 keys stand for `Ctrl+S`/`Ctrl+T` and `Ctrl+H`; a Japanese one's -半角/全角, ひらがな/カタカナ, 変換 and 無変換 for the kana modes, `Space` -and English. +`Ctrl+Shift+V` still pastes. `Backspace`, `Enter`, `Tab`, `Esc` and the +arrow and page keys do the same under `Ctrl`, so `Ctrl+Backspace` still +deletes a word. The mode switched to — `한`, `あ`, `ア`, `ă`, `A` — shows +in the popup until the next key. A Korean keyboard's 한/영 and 한자 keys +stand for `Ctrl+S`/`Ctrl+T` and `Ctrl+H`; a Japanese one's 半角/全角, +ひらがな/カタカナ, 変換 and 無変換 for the kana modes, `Space` and English. ## Composing diff --git a/strans.c b/strans.c index 8d15ca0..1c17ada 100644 --- a/strans.c +++ b/strans.c @@ -842,6 +842,11 @@ transition(u32int ks, u32int mod, Str *com) break; case Kmuhenkan: ks = 't'; mod = Mctrl; break; } + /* Ctrl+Backspace deletes a word, Ctrl+Tab changes tab: not ours. */ + if(ks >= Kspec && (mod & ~Mshift)){ + flush(com); + return 0; + } if(search.lang) return searchkey(ks, mod, com); n = movedelta(ks); diff --git a/tests/engine_test.c b/tests/engine_test.c index cba9afa..3532577 100644 --- a/tests/engine_test.c +++ b/tests/engine_test.c @@ -574,6 +574,15 @@ engine_korean_modifiers_and_backspace(struct ct *t) CT_EQ_INT(t, 0, im.pre.n); CT_CHECK(t, !keystroke(Kback, 0, &com)); } + + init(); + im.l = getlang(LangKO); + sclear(&com); + if(typekeys(t, "rk", &com)){ + CT_CHECK(t, !keystroke(Kback, Mctrl, &com)); + checkstr(t, "Ctrl+Backspace commits and passes", "가", &com); + CT_EQ_INT(t, 0, im.pre.n); + } } void