fix(windows): keep plain slash on text input path

This commit is contained in:
GeekMr committed 2026-09-26 14:44:45 +08:00
1 parent ee09b7046d
commit e82cf1c937
2 files changed
+2 -1

No files matched your search

@@ -595,6 +595,7 @@ mod tests {
assert_eq!(encode(&keystroke("a"), &mode), None);
assert_eq!(encode(&keystroke("1"), &mode), None);
assert_eq!(encode(&keystroke("space"), &mode), None);
assert_eq!(encode(&keystroke("/"), &mode), None);
// Ctrl+C 仍走记录,不能为了 IME 把快捷键也放掉。
let mut ctrl_c = keystroke("c");
ctrl_c.modifiers.control = true;
@@ -13,7 +13,7 @@ pub(super) fn win32_encodes_keystroke(ks: &Keystroke) -> bool {
return true;
}
let key = ks.key.as_str();
if key == "space" {
if key == "space" || key == "/" {
return false;
}
let mut chars = key.chars();