mirror of
https://github.com/zed-industries/zed.git
synced 2024-09-18 18:08:07 +03:00
windows: Don't report 'shift' for certain keys (#9479)
allows keybindings for character such as `:`, `?`, etc. (important for vim mode!) alternative solution is here: #9478 Release Notes: - N/A
This commit is contained in:
parent
be4e19b834
commit
9f96c43ff7
@ -455,8 +455,14 @@ impl WindowsWindowInner {
|
||||
if first_char.is_control() {
|
||||
None
|
||||
} else {
|
||||
let mut modifiers = self.current_modifiers();
|
||||
// for characters that use 'shift' to type it is expected that the
|
||||
// shift is not reported if the uppercase/lowercase are the same and instead only the key is reported
|
||||
if first_char.to_lowercase().to_string() == first_char.to_uppercase().to_string() {
|
||||
modifiers.shift = false;
|
||||
}
|
||||
Some(Keystroke {
|
||||
modifiers: self.current_modifiers(),
|
||||
modifiers,
|
||||
key: first_char.to_lowercase().to_string(),
|
||||
ime_key: Some(first_char.to_string()),
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user