Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: heyspencerb on March 01, 2021, 03:11:56 PM

Title: Overhauling Search Function
Post by: heyspencerb on March 01, 2021, 03:11:56 PM
Hello!

I have been using the Fiio M3K for a while and I have an idea on how to make text entry for search really easy. Here are my ideas, each with an increasing amount of complexity and computation needed.

Here are my assumptions:
On most devices it Is easier to move up and down than left and right because most devices use some kind of scroll wheel for up and down and other buttons for left and right.

Simplest system:
Look up data on the most commonly used characters in the English and other supported languages, and arrange the characters in an order where the most common characters are on the  center column, next most common on the columns either side, so that you only need to use the wheel for the most common, and only need one button click to get to the second and third most common character sets.

Second simplest:
Same idea as before, but instead of just looking up a table of the most used characters, count how often each character appears in the database and organize based on each person’s personal database. That way we won’t run into issues of different languages being stuck with English layouts and such, because each layout will be made specifically for each person.

Medium difficulty:
Run the same count as before, but do it for each place in the name. So see what’s the most common first letter, second letter, ect and each time you choose a letter it changes the layout to be the most common for the place you are currently looking for. As an example with my library, I have tons of bands starting with “The” so the first center letter would probably be t, then the second letter the center would probably be H, and so on

Definitely overkill system:
For each letter, find the most likely letter to follow that letter, then most likely to follow that letter, ect so as you are typing it is always putting the most likely letter to follow the string you have typed in so far at the center.

Let me know what you all think, and if the layout not being alphabetical would be too confusing for People, i was just getting frustrated by how long it takes to type something in sometimes. Either way I’ll probably develop some version of this for myself, but I’d love to hear your input!

Thanks!
Title: Re: Overhauling Search Function
Post by: Frankenpod on March 01, 2021, 04:43:26 PM
I am sceptical if anyone is ever going to put in the work needed to implement such a system.  But I do agree that the present text-entry method is cumbersome and non-intuitive to use (whenever I've had to enter text I find I can't remember how it works).

  With your first suggestion (which I think is the most practical of them) the arrangement of characters would presumably have to be set in a configuration file somewhere, so it could be different for different languages, as it would need to be.  I think trying to work out a 'personal' database of letter-order sounds seriously over-complicated, and I don't know many people would be doing enough text-entry on their device to generate such a thing.
Title: Re: Overhauling Search Function
Post by: heyspencerb on March 01, 2021, 06:23:55 PM
Fair, I found the file for organizing the text entry page, so with about 10-20 min work I could back the first one together as a proof of concept, but your right, having it as a config file would be the  long term solution.
Title: Re: Overhauling Search Function
Post by: heyspencerb on March 01, 2021, 06:36:30 PM
As a middle ground, I was able to easily find both the most common first letter, and then most common letter in general. Thoughts on it changing for only the first letter of each word because those two stats are pretty different from each other?
Title: Re: Overhauling Search Function
Post by: heyspencerb on March 01, 2021, 08:05:11 PM
Here is my first pass at organizing them, and I found how to change th code to start your cursor in the middle, so on T for the first and E for the rest. I am going to make this change on my device and try it out for a little while then report back

First Letter   
     H   G
X   B   N
J   W   R
V   I   D
U   T   F
K   O   M
Y   S   E
Q   C   L
Z   P   A
      
Rest of letters   
     R   Y
Q   S   F
J   I   M
V   A   C
P   E   D
B   T   L
K   O   U
X   N   W
Z   H   G
Title: Re: Overhauling Search Function
Post by: heyspencerb on March 02, 2021, 12:10:38 PM
Hmm, this might take more thinking. I'm finding that the majority of the time in the text entry window is spent figuring out where the letter is on the screen, not on actually scrolling to it. I am still finding the new layout to be very helpful but I think the plan of having the layout change with each letter chosen would backfire as you would be spending more time looking for the letter you need, and you wouldn't ever be able to learn the placement of each letter over time as its always changing.

I will keep working on a single layout that works well, and then have that be the chosen layout, and I will probably have the cursor return to the center each time you choose a letter.
Title: Re: Overhauling Search Function
Post by: Bilgus on March 03, 2021, 02:14:27 PM
I've added the ability to use custom text layout for the standard text input function

my intention is to use it to limit the characters to only those acceptable for the current consumer

https://gerrit.rockbox.org/r/c/rockbox/+/2572

and an example use..
https://github.com/Rockbox/rockbox/blob/master/apps/plugins/announce_status.c#L291

Code: [Select]
#define K_TRACK_TA "TT TA;\n"
#define K_TRACK    "TE TL TR;\n"
#define K_TRACK1   "T1 T2 T3;\n\n"
#define K_PLAYLIST "PC PN PR P1 P2;\n"
#define K_BATTERY  "BP BM B1;\n"
#define K_SLEEP    "RS R2 R3;\n"
#define K_RUNTIME  "RT R1;"
#define KEYBD_LAYOUT  (K_TIME K_DATE K_TRACK_TA K_TRACK K_TRACK1 K_PLAYLIST K_BATTERY K_SLEEP K_RUNTIME)
////
if (!kbd_create_layout(KEYBD_LAYOUT, kbd_p, kbd_bufsz))
    kbd_p = NULL;
rb->kbd_input(gAnnounce.wps_fmt, MAX_ANNOUNCE_WPS, kbd_p);