Skip to content
This repository has been archived by the owner on Apr 1, 2020. It is now read-only.

Adding support for Alt-Shift key bindings #2755

Open
otto-dev opened this issue Sep 5, 2019 · 1 comment
Open

Adding support for Alt-Shift key bindings #2755

otto-dev opened this issue Sep 5, 2019 · 1 comment

Comments

@otto-dev
Copy link

otto-dev commented Sep 5, 2019

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

@oni-bot
Copy link

oni-bot bot commented Sep 5, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant