Update handling of 'pending' keys
Before this change if you had a matching binding and a pending key, the matching binding happened unconditionally. Now we will wait a second before triggering that binding to give you time to complete the action.
This commit is contained in:
parent
b8ed83a452
commit
b06e2eb6af
7 changed files with 137 additions and 44 deletions
|
@ -1542,9 +1542,7 @@ extern "C" fn insert_text(this: &Object, _: Sel, text: id, replacement_range: NS
|
|||
replacement_range,
|
||||
text: text.to_string(),
|
||||
});
|
||||
if text.to_string().to_ascii_lowercase() != pending_key_down.0.keystroke.key {
|
||||
pending_key_down.0.keystroke.ime_key = Some(text.to_string());
|
||||
}
|
||||
pending_key_down.0.keystroke.ime_key = Some(text.to_string());
|
||||
window_state.lock().pending_key_down = Some(pending_key_down);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue