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

Improve key swipe interface #962

Open
Helium314 opened this issue Jul 9, 2024 · 1 comment · May be fixed by #983
Open

Improve key swipe interface #962

Helium314 opened this issue Jul 9, 2024 · 1 comment · May be fixed by #983
Labels
enhancement New feature or request key swipe something related to swiping, but not gesture typing PR Contributors are encouranged to submit a pull request. Just ask in case you are interested.

Comments

@Helium314
Copy link
Owner

Currently key swipes (not gesture typing) work only on space an delete keys. Space swipe can be customized somewhat, delete swipe can only be enabled/disabled. Changing the interface to a more flexible onKeySwipe(keyCode, direction) and onEndSwipe(keyCode) would allow simpler, more contained and also more customizable swipe actions:

  • Should be a step towards all issues labeled with key swipe
  • Could allow option to use Unexpected Keyboard style swipe instead of popup keys
  • Allows/simplifies adding step minium to the recently added numpad toggle space swipe (and removing related code from PointerTracker)

There are some things to consider though:
There is a single KeyboardActionListener, but mulitple PointerTrackers (to allow multi-touch). This means the KeyboardActionListener needs to be careful when keeping track of the swiping state. Maybe swipe actions will need to provide the pointer tracker id. Using multiple KeyboardActionListeners will not work here, because currently the KeyboardActionListenerImpl keeps track of the meta state (ctrl/alt/...), which should be global (though meta state could possible be handled in another place).
Maybe the KeyboardActionListener(Impl) could internally use multiple KeySwipeListeners (which would handle the key swipes, and nothing else), one per pointer tracker. Using such a KeySwipeListener with different implementations might also be useful for avoiding convoluted code when dealing with mutually exclusive key swipe styles.
The whole thing should also consider performance, as onKeySwipe can be called very often.

@Helium314 Helium314 added enhancement New feature or request PR Contributors are encouranged to submit a pull request. Just ask in case you are interested. key swipe something related to swiping, but not gesture typing labels Jul 9, 2024
@devycarol
Copy link
Contributor

I'll PR more delete keys soon, which includes a word-delete slider. That would be a nice option for the regular delete key, similar to Gboard.

@devycarol devycarol linked a pull request Jul 15, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request key swipe something related to swiping, but not gesture typing PR Contributors are encouranged to submit a pull request. Just ask in case you are interested.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants