Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad experience for users with non-US keyboard layouts #47

Closed
guillermooo opened this issue Nov 29, 2015 · 2 comments
Closed

bad experience for users with non-US keyboard layouts #47

guillermooo opened this issue Nov 29, 2015 · 2 comments

Comments

@guillermooo
Copy link
Member

Currently, the extension is unusable for users having non-US keyboard layouts enabled.

As it seems there's no solution in sight from VSC POV, we could try the following:

  • map all keys in a US keyboard layout
  • translate from US layout to other layouts prior to handling key
  • have a setting to determine which keyboard layout should be used internally for the translation by the extension

Other options that I've discarded:

I think having a package.json per keyboard layout won't work because we can't load those selectively. Similarly, we couldn't even load the keybindings sections selectively because all the keybindings have to be lumped together in there.

If we could create a custom context for the when key in a keybinding, though ("when": "kbdLayout_es_ES"), we could use package.json, but we'd have to load a huge amount of key bindings.

Therefore, it seems that having a translation layer in the code would be more flexible (we can load only the keyboard layout we're interested in based on a setting).

Example:

// In ModeHandler class
...
key = this.config.activeKeyboardLayout.translate(key);
// eventually
key = this.config.mappings.resolve(key);
modeHandler.handleKey(key);
@guillermooo
Copy link
Member Author

@guillermooo
Copy link
Member Author

Potentially less bad now:

#61

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

No branches or pull requests

1 participant