Skip to content

macmeta interferes with Swedish keyboard #768

Open

Description

@segeljakt

If I start macvim:

mvim -u NONE

and do

:set nocp
:set macmeta
:inoremap <M-e> foo

Then, pressing either å or Alt+e in insert mode will insert foo. Both are treated as the same key. Is there any way to allow them to have separate mappings?

Activity

  1. ychin commented on Nov 20, 2018

    @ychin
    Member

    The short answer is no. I assume you are using the GUI version of MacVim instead of just in the terminal? (Edit: yes you are, since you are calling mvim)

    GVim basically treats <M-e> as the same as the character 'e' with the high bit set, which is the same as å, hence it has trouble determining between the two. When you set macmeta, MacVim basically behaves the same way, so there's no way to differentiate the two easily.

    I do agree this is kind of silly as it's sort of just holdover from Vim's terminal roots even when you are running it in GUI mode. I would need to think a little about how to fix this. Ideally, <M-e> just gets triggered when you hit Alt-E, and å only when you hit that character.

  2. added
    InputIssues related to keyboard or other types of input
    on Feb 19, 2019
  3. eirnym commented on May 18, 2019

    @eirnym
    Contributor

    @segeljakt Additionally to @ychin said, you can turn on keyboard preview on any OS you want and look how the modifiers work.
    in macOS both alts modifies keys before they went to MacVim.
    In Windows only right alt key modifies keys, as many apps using Alt+ to do some actions.

  4. added this to the Release 175 milestone on Aug 9, 2022
  5. modified the milestones: Release 175, Release 176 on Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    InputIssues related to keyboard or other types of input

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions