aboutsummaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-08-23 00:01:57 +0300
committerGitHub <noreply@github.com>2026-08-23 00:01:57 +0300
commit1d604329b0ded93d18fd6b27f72c7473d1fee20f (patch)
tree2ac419b930b57c232b3e7bc8921beebfa1b997bb /src/input
parentc714e4c20e3272c21722a6f083fc2d592c244385 (diff)
fix(windows): preserve non-us shifted text (#3055)
* fix(windows): preserve non-us shifted text refs #3045 * fix(windows): retain shifted key repeat lifecycle refs #3045
Diffstat (limited to 'src/input')
-rw-r--r--src/input/encode.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/input/encode.rs b/src/input/encode.rs
index 8ec8a1c5..774ab1a6 100644
--- a/src/input/encode.rs
+++ b/src/input/encode.rs
@@ -16,7 +16,10 @@ pub fn encode_key(key: KeyEvent, protocol: KeyboardProtocol) -> Vec<u8> {
}
pub fn encode_terminal_key(key: TerminalKey, protocol: KeyboardProtocol) -> Vec<u8> {
- if key.kind != crossterm::event::KeyEventKind::Release {
+ // REPORT_ALL_KEYS must retain physical press/repeat/release semantics instead of
+ // reducing a native key to its layout-generated text.
+ let preserve_physical_key = key.has_physical_identity() && protocol.reports_all_keys();
+ if !preserve_physical_key && key.kind != crossterm::event::KeyEventKind::Release {
if let Some(text) = &key.generated_text {
return text.as_bytes().to_vec();
}