fix: double space on Ctrl+Space toggle (flush char forwarded twice when engine disabled)
This commit is contained in:
parent
81a2baa5eb
commit
ff607f0559
1 changed files with 5 additions and 3 deletions
|
|
@ -1208,9 +1208,11 @@ fn run_with_evdev(
|
|||
if !commands.is_empty() {
|
||||
consumed_keys.insert(keycode);
|
||||
execute_commands(&*injector, &commands, false);
|
||||
// Flush chars: forward raw key after injection
|
||||
// (engine no longer includes flush char in insert)
|
||||
if is_flush_char(ch) {
|
||||
// Flush chars: forward raw key after injection.
|
||||
// When engine is disabled (English mode), the Insert event
|
||||
// already contains the character — forwarding raw key
|
||||
// would double-inject (double space on Ctrl+Space toggle).
|
||||
if is_flush_char(ch) && daemon.engine.is_enabled() {
|
||||
injector.send_key_event(keycode, 1);
|
||||
injector.send_key_event(keycode, 0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue