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

FR: Support configurable key mapping #7

Closed
indiscipline opened this issue Jun 4, 2021 · 1 comment
Closed

FR: Support configurable key mapping #7

indiscipline opened this issue Jun 4, 2021 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@indiscipline
Copy link
Owner

indiscipline commented Jun 4, 2021

This is certainly an important feature.
Tetronimia can't have them all enabled at the same time: we already have a PR #4 that I'm not totally fond of, as it breaks the ergonomics of the default key mapping (left hand on D and F and Space on qwerty keyboards).

There's a few options:

  1. Support specific key map as some kind of a complicated switch. As far as I understand, cligen doesn't support parsing tables (or other key-value pairs) yet, so we need to resort to parsing long user input which is error-prone.
  2. Support supplying a key map from a specific config file as a switch. Much more convenient. Tetronimia could generate a default file with self-explanatory syntax per request too.
  3. Support a few default keymap modes, such as vim | emacs | wasd | .... Even easier (to support and to use), but not flexible enough.
  4. Support overall config files. This is desirable, but complicates things a lot, encourages replay and discourages using the defaults. Having the support for configs leads to having no excuse to not implement some other features which is not exactly a welcome outcome :) This also requires a separate FR.

Please, share your thought on options 1-3 or other ideas on how to implement this elegantly.

@indiscipline indiscipline added enhancement New feature or request question Further information is requested labels Jun 4, 2021
@indiscipline
Copy link
Owner Author

Fixed in v0.3.0! See release notes for details and usage.

Went with the combination of options 1 and 3 of the original FR. That was fun. Unfortunately, now we're up one dependence (illwill) but it looks fine.

@kaushalmodi hope you'll like it. The emacs bindings are based on your #4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant