Deadkeys 2 (#20612)
Re-land of #20515 with less brokenness In particular it turns out that for control, the .characters() method returns the control code. This mostly didn't make a difference, except when the control code matched tab/enter/escape (for ctrl-y,ctrl-[/ctrl-c) as we interpreted the key incorrectly. Secondly, we were setting IME key too aggressively. This led to (in vim mode) cmd-shift-{ being interpreted as [, so vim would wait for a second [ before letting you change tab. Release Notes: - N/A
This commit is contained in:
parent
ad31aacb7a
commit
96deabfb78
8 changed files with 252 additions and 224 deletions
|
@ -1448,13 +1448,27 @@ unsafe fn ns_url_to_path(url: id) -> Result<PathBuf> {
|
|||
|
||||
#[link(name = "Carbon", kind = "framework")]
|
||||
extern "C" {
|
||||
fn TISCopyCurrentKeyboardLayoutInputSource() -> *mut Object;
|
||||
fn TISGetInputSourceProperty(
|
||||
pub(super) fn TISCopyCurrentKeyboardLayoutInputSource() -> *mut Object;
|
||||
pub(super) fn TISGetInputSourceProperty(
|
||||
inputSource: *mut Object,
|
||||
propertyKey: *const c_void,
|
||||
) -> *mut Object;
|
||||
|
||||
pub static kTISPropertyInputSourceID: CFStringRef;
|
||||
pub(super) fn UCKeyTranslate(
|
||||
keyLayoutPtr: *const ::std::os::raw::c_void,
|
||||
virtualKeyCode: u16,
|
||||
keyAction: u16,
|
||||
modifierKeyState: u32,
|
||||
keyboardType: u32,
|
||||
keyTranslateOptions: u32,
|
||||
deadKeyState: *mut u32,
|
||||
maxStringLength: usize,
|
||||
actualStringLength: *mut usize,
|
||||
unicodeString: *mut u16,
|
||||
) -> u32;
|
||||
pub(super) fn LMGetKbdType() -> u16;
|
||||
pub(super) static kTISPropertyUnicodeKeyLayoutData: CFStringRef;
|
||||
pub(super) static kTISPropertyInputSourceID: CFStringRef;
|
||||
}
|
||||
|
||||
mod security {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue