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

Release shift action #72

Open
a-metz opened this issue Dec 4, 2021 · 2 comments
Open

Release shift action #72

a-metz opened this issue Dec 4, 2021 · 2 comments
Labels
enhancement New feature or request need design

Comments

@a-metz
Copy link

a-metz commented Dec 4, 2021

My use case is to have \ and / on a single key.
To get a \ I want to press this key without shift.
To get a / I want to press this key while holding shift.

/ is non-shifted on the US layout and thus this would require multiple actions:

  • temporally releasing shift
  • press / key
  • holding shift again to recreate the correct state

Looking at the code, I think I need a new Action which creates a CustomEvent::Release? I am pretty lost though, due to my unfamiliarity with Rust. Happy to dig in deeper with your guidance, though.

@camrbuss
Copy link
Contributor

Instead of using a "Shift" key, why not make that key a new layer and shift everything on the layer except for the \ and /?

@TeXitoi
Copy link
Owner

TeXitoi commented Apr 19, 2022

Keyberon don't allow you to modify all the state of the keyboard, so it is basically impossible (now) to release a pushed key. Such a feature is difficult to do cleanly and might produce a lot of subtil bugs.

So, if something like that is really needed, we need to be careful to design something well done.

The layer trick should be a good workaround.

@TeXitoi TeXitoi added enhancement New feature or request need design labels Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request need design
Projects
None yet
Development

No branches or pull requests

3 participants