mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-11 13:10:54 +00:00
Avoid text insertion when holding down the fn
key
This commit is contained in:
parent
fb2ae84719
commit
dee416bdbe
1 changed files with 2 additions and 1 deletions
|
@ -30,6 +30,7 @@ impl Event {
|
|||
let alt = modifiers.contains(NSEventModifierFlags::NSAlternateKeyMask);
|
||||
let shift = modifiers.contains(NSEventModifierFlags::NSShiftKeyMask);
|
||||
let cmd = modifiers.contains(NSEventModifierFlags::NSCommandKeyMask);
|
||||
let function = modifiers.contains(NSEventModifierFlags::NSFunctionKeyMask);
|
||||
|
||||
let unmodified_chars = CStr::from_ptr(
|
||||
native_event.charactersIgnoringModifiers().UTF8String() as *mut c_char,
|
||||
|
@ -80,7 +81,7 @@ impl Event {
|
|||
NSF12FunctionKey => "f12",
|
||||
|
||||
_ => {
|
||||
if !cmd && !ctrl {
|
||||
if !cmd && !ctrl && !function {
|
||||
input = Some(
|
||||
CStr::from_ptr(
|
||||
native_event.characters().UTF8String() as *mut c_char
|
||||
|
|
Loading…
Reference in a new issue