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

Replace bottom keys in emoji / clipboard view with keyboard #966

Merged
merged 17 commits into from
Sep 1, 2024

Conversation

Helium314
Copy link
Owner

@Helium314 Helium314 commented Jul 10, 2024

WIP PR for having an actual keyboard at the bottom row of emoji and clipboard views.
This enables key swipes and allows easily customizing this layout.

At the moment the implementation is very basic, and only done for emoji view.
To do:

  • do not crash when getting popups in main keyboard
  • use the "normal" full width spacebar by default
  • improve switching back to normal keyboard (currently switches on key press with unexpected consequences, but should rather be on key release) fixed by using alpha key instead of symbol_alpha
  • use more in-place mechanisms for building the keyboard
  • move code out of emoji view, so it can be used for clipboard too
  • make it customizable (maybe not in this PR)

fixes #850
fixes #593
fixes #404

@devycarol
Copy link
Contributor

Does the AOSP keyboard have a special view for the emoji layout, or was that added in OpenBoard with the smooth-scrolling?

You once mentioned a challenge of perhaps implementing d-pad arrow keys that span multiple rows. I wonder if these special layouts could be entirely composed of special MainKeyboardView objects. A small emoji window as a bonus top-row similar to the number row would be kinda wack.

@Helium314
Copy link
Owner Author

Does the AOSP keyboard have a special view for the emoji layout, or was that added in OpenBoard with the smooth-scrolling?

I only have LineageOS variant of AOSP keyboard ready, but looking at the existence of emoji layout files I'd say it's in AOSP.
LineageOS emoji keyboards scroll left/right instead of up/down, but look pretty similar otherwise.

You once mentioned a challenge of perhaps implementing d-pad arrow keys that span multiple rows

Essentially the issue with multi-row keys is not that it's really difficult, but the keyboard parser and builder are both based on rows. Hardcoding a specific layout should be relateively simple, but there is some additional work involved in making this configurable (plus the customization would need yet another format).

I wonder if these special layouts could be entirely composed of special MainKeyboardView objects

You mean every key is a separate keyboard?

A small emoji window as a bonus top-row similar to the number row would be kinda wack.

Hmm, using one row of the already wanted two-row suggestion strip / toolbar might be more suitable.

@Helium314
Copy link
Owner Author

Helium314 commented Sep 1, 2024

The PointerTracker crash issue is somewhat tricky.
It happens because the PointerTracker instances share some static objects that are coming from the MainKeyboardView, created in init. This does not work any more if we have multiple MainKeyboardViews.
The ancient comment above init TODO: Add PointerTrackerFactory singleton and move some class static methods into it. would be a way to fix the problem. Though maybe I'll try making it work in a simpler way... (edit: done, revert c5c5d88 when doing it properly)

@Helium314 Helium314 marked this pull request as ready for review September 1, 2024 18:51
@Helium314 Helium314 merged commit ab34815 into main Sep 1, 2024
1 check passed
@Helium314 Helium314 deleted the bottom_row_keyboard branch September 1, 2024 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants