mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
input: do not emit sequence on <BS> when their's UTF-8 text
This commit is contained in:
@ -245,6 +245,10 @@ fn legacy(
|
|||||||
// If we're in a dead key state then we never emit a sequence.
|
// If we're in a dead key state then we never emit a sequence.
|
||||||
if (self.event.composing) return "";
|
if (self.event.composing) return "";
|
||||||
|
|
||||||
|
// When pressed backspace and have UTF-8 text, do not emit sequence.
|
||||||
|
// This prevents backspace emitted twice on macOS with korean input method.
|
||||||
|
if (self.event.key == .backspace and self.event.utf8.len > 0) return "";
|
||||||
|
|
||||||
// If we match a PC style function key then that is our result.
|
// If we match a PC style function key then that is our result.
|
||||||
if (pcStyleFunctionKey(
|
if (pcStyleFunctionKey(
|
||||||
self.event.key,
|
self.event.key,
|
||||||
|
Reference in New Issue
Block a user