onivim / oni

Oni: Modern Modal Editing - powered by Neovim

Home Page:https://www.onivim.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Adding support for Alt-Shift key bindings

otto-dev opened this issue · comments

Alt-Shift-Xis received as <M-x> in oni, but as <M-X> in neovim (gui). Notice the capital X. This applies to any Alt-Shift combination. init.vim keybindings differentiate between <M-X> (uppercase) keybindings and <M-x> (lowercase) keybindings, i.e. shift pressed / not pressed. nmap <M-X> :something<CR> will only be triggered if shift is pressed.

This can be fixed in onivim by adding the following to your configuration:

    oni.input.resolvers.addResolver((event, key) => {
        if(event.altKey && event.shiftKey) return key.toString().toUpperCase()
        return key;
    })

Oni Version: 0.3.9
Neovim Version (Linux only): 0.3.8
Operating System: Arch Linux

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.