rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

Unable to map <C-Tab> and <C-S-Tab> #190

Closed rolandcrosby closed 8 years ago

rolandcrosby commented 8 years ago

I attempted to map <C-Tab> and <C-S-Tab> to switch between tabs, as follows:

map <C-Tab> gt
map <C-S-Tab> gT

This works correctly in MacVim, and apparently works in gVim as well, but does not work in neovim-dot-app.

rogual commented 8 years ago

Probably to do with the fact that tab itself is C-I. Might be fixable, will have a look.

bambu commented 8 years ago

Looks like <C-Tab> and <C-S-Tab> are never interpreted by the -keyDown: event. This same problems appears when trying those keys in terminal neovim both on iTerm and Terminal.

MacVim / VimR do it by handling it on the NSApplication's -sendEvent: event and making sure that it gets passed as a -keyDown: event. There does not appear to be an equivalent type of event for NSApplicationDelegate. This may require switching app.mm from NSApplicationDelegate to NSApplication. Not sure what all this entails. @rogual any reason why you didn't use NSApplication ?

bambu commented 8 years ago

nvm. found a better solution that doesn't require NSApplication

bambu commented 8 years ago

This should also be closed as solution has been merged