diff options
Diffstat (limited to 'alacritty/src/input.rs')
-rw-r--r-- | alacritty/src/input.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/alacritty/src/input.rs b/alacritty/src/input.rs index 35aaedda..a612db12 100644 --- a/alacritty/src/input.rs +++ b/alacritty/src/input.rs @@ -754,6 +754,11 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> { /// Process key input. pub fn key_input(&mut self, input: KeyboardInput) { + // IME input will be applied on commit and shouldn't trigger key bindings. + if self.ctx.display().ime.preedit().is_some() { + return; + } + // All key bindings are disabled while a hint is being selected. if self.ctx.display().hint_state.active() { *self.ctx.suppress_chars() = false; @@ -801,6 +806,11 @@ impl<T: EventListener, A: ActionContext<T>> Processor<T, A> { pub fn received_char(&mut self, c: char) { let suppress_chars = *self.ctx.suppress_chars(); + // Don't insert chars when we have IME running. + if self.ctx.display().ime.preedit().is_some() { + return; + } + // Handle hint selection over anything else. if self.ctx.display().hint_state.active() && !suppress_chars { self.ctx.hint_input(c); |