1
1
mirror of https://github.com/qvacua/vimr.git synced 2024-12-25 06:43:24 +03:00

GH-626 Add a special handling for the Emoji menu

This commit is contained in:
Tae Won Ha 2018-03-25 10:31:53 +02:00
parent b046eace26
commit ffa2accf96
No known key found for this signature in database
GPG Key ID: E40743465B5B8B44

View File

@ -81,16 +81,19 @@ extension NvimView {
if .keyDown != event.type { return false }
let flags = event.modifierFlags.intersection(.deviceIndependentFlagsMask)
/* <C-Tab> & <C-S-Tab> do not trigger keyDown events.
Catch the key event here and pass it to keyDown.
(By rogual in NeoVim dot app
https://github.com/rogual/neovim-dot-app/pull/248/files )
*/
// <C-Tab> & <C-S-Tab> do not trigger keyDown events.
// Catch the key event here and pass it to keyDown.
// (By rogual in NeoVim dot app: https://github.com/rogual/neovim-dot-app/pull/248/files)
if flags.contains(.control) && 48 == event.keyCode {
self.keyDown(with: event)
return true
}
// Emoji menu: Cmd-Ctrl-Space
if flags.contains([.command, .control]) && 49 == event.keyCode {
return false
}
guard let chars = event.characters else {
return false;
}
@ -114,7 +117,7 @@ extension NvimView {
self.uiBridge.vimInput(self.wrapNamedKeys("Nul"))
return true
}
// NsEvent already sets \u{1f} for <C--> && <C-_>
// NSEvent already sets \u{1f} for <C--> && <C-_>
return false
}