oni icon indicating copy to clipboard operation
oni copied to clipboard

Adding support for Alt-Shift key bindings

Open otto-dev opened this issue 6 years ago • 1 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

otto-dev avatar Sep 05 '19 12:09 otto-dev

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.

oni-bot[bot] avatar Sep 05 '19 12:09 oni-bot[bot]