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

Sliding spacebar cursor doesn't work for more than one letter #91

Closed
rohit-burman opened this issue Mar 27, 2023 · 12 comments
Closed

Sliding spacebar cursor doesn't work for more than one letter #91

rohit-burman opened this issue Mar 27, 2023 · 12 comments

Comments

@rohit-burman
Copy link

As mentioned in previous issues (#59 ) to have slide spacebar cursor to move through words which was then implemented.
But on sliding cursor doesn't move more than one letter so you have to just swipe again and again for all letters in word.
As in gboard or open board we can hold on swipe to navigate through words and letters in both forward and backward direction.

@dessalines
Copy link
Owner

I don't understand how this would work. But right now, the spacebar sliding exactly matches how the messageease keyboard works.

If you want to go back full words, you can either swipe left on delete to delete the last word, or just click in the textarea.

@corniest
Copy link

screen-20230327-130201.mp4

It would work like this if added

@dessalines
Copy link
Owner

I'm not sure how that would work code-wise. Do you know of any sample code for this?

@corniest
Copy link

I think this issue in florisboard might be a good example?
florisboard/florisboard#19

@domportera
Copy link
Contributor

this could be considered to be related to issue #48 - maybe some thought should be put into extending different interactions (press and swipe) so both can be continued/held/etc

other than that it should be relatively simple to map the SPACE keyboard swipes in different "Shift" modes such that if you're in the Shifted keyboard, it goes back or forward a full word?

@KraXen72
Copy link
Contributor

KraXen72 commented May 2, 2023

this could be implemented like this(imo):
measure:

  1. the start X position where user put their finger down
  2. the difference - current X position of finger - start X position (continuously, each swiped pixel until let gone
  3. one letter would get an arbitrary amount of pixels, that need to be swiped before it is skipped - i imagine 1/3 of the spacebar / one normal key could account for around 8 letters skipped

the cursor position gets updated automatically, mid-drag, not only on let go. on let go, the start x position get's reset and position calculation stops.

  • spacebar would have to have the default swipe handling disabled.
  • moving up or down while swiping does not do anything, or, if you want to preserve line-hopping, the pixel threshold to hop a line should be like 1/2 of a key(in the keyboard 9x9)

@dessalines

@dessalines
Copy link
Owner

@KraXen72 would you like to work on this? Seems like a good first issue.

@KraXen72
Copy link
Contributor

KraXen72 commented May 2, 2023

i already cloned the repo to add my custom keymap, so it might be an interesting challenge. i don't know how to set up the dev env for compilation & testing tho (i just opened the kt files in vscode for editing the keymaps), but if i got that to work, i guess i could take a stab at it.

@KraXen72
Copy link
Contributor

KraXen72 commented May 2, 2023

@Pijunoid , what keyboard did you use in the video? it doesen't look like GBoard, and if it's FOSS, i could take a look at it's implementation for swiping of the spacebar.

@domportera
Copy link
Contributor

it's pretty straightforward - you just need the latest AndroidStudio, hit the "Gradle Build" elephant button, then hit play/build/etcetc. It's a bit more than that but the IDE basically just tells you what you need to do in its outputs

@corniest
Copy link

corniest commented May 2, 2023

@Pijunoid , what keyboard did you use in the video? it doesen't look like GBoard, and if it's FOSS, i could take a look at it's implementation for swiping of the spacebar.

It's florisboard beta, also open source

@KraXen72
Copy link
Contributor

KraXen72 commented Sep 6, 2023

sorry for no activity from me on this, i am currently working on other projects. i am keeping this in mind for when i eventually attempt android development, but if anyone else wants to work on it, feel free to! i'll pick some other issue then.

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

5 participants