-
-
Notifications
You must be signed in to change notification settings - Fork 43
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
Soft-Keyboard numpad #188
Soft-Keyboard numpad #188
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it out and I must say it looks great! Appart from the fact it needs minor visual adjustment, it is almost like I imagined it.
However, from functional perspective, it needs more more work before I can approve it:
- It is not possible to select a suggestion by touching it. And this means the suggestion list is basically unusable on a touchscreen-only device. The first word is not always the one users would want to type.
- The full-sized keypad you created replaces the current simple one. This will be unacceptable for some users, including me. I would like to keep the small toolbar-like and use the touch Backspace and Settings key, but type using the physical keys, and only have the full keypad on my tablet, which doesn't have hardware keys. So, a three way option is a must.
- The "inscribed" letters on the keys do not change when the language changes. This is not OK for Cyrillic-based languages, where the layout is different.
Sorry for my late reply and thanks for your feedback.
I am missing this feature, too.
Yes, an additional menu option would be useful.
Thanks to pointing for this bug. |
…put method changed (lower / upper case)
…eyboard. Overwrites DPAD_DOWN if enabled.
…in buttons) and full sized keyboard with numpad
Please let me know if there is still something crucial missing or in case of any bugs. |
I am going to need some time for a detailed code review. Anyway, here are several things that I noticed when I skimmed the code and tested a bit:
For now, you could clean up the code, while I think of how to improve the view handler. |
Thanks for your feedback!
Strange. Since I just send KEY-Action UP- and Down-Events to the TT9 class, all behaviour should be the same. How/Where is this solved with the physical buttons?
Done, except for one line which is explicitly marked as reference (also see below dpad navigation).
Good point, I forgot to check this... I will have a look on this.
Actually this is intended since this happens only if a developer (me or someone in future using this method) send a not supported Event, so he will directly note it while testing. During normal usage there is no chance that this will throw an error (if tested at least one time). However, if it is easy to send toast messages from this code, this might be an option, too. But currently I don't know how to do it from this point of the code.
Explicit usecase is Android TV: There is no Touch-Screen but huge space on screen to show buttons for accessing e.g. settings menu, if one does not remember which long-press shortcut button was defined once weeks ago. So one can navigate with the dpad to the button. However, if this is enabled, this function breaks the default behaviour of DPAD_DOWN. To avoid this, I added the preference option. As written in the description of the setting, this is not working on Touch-Screen-Devices (since nobody should need it there and technically enabling this would have side-effects: In order to enable it, the buttons need to be setFocusableInTouchMode(true) which at least on my mobile caused this behaviour: first touch -> focused ("highlighted") but nothing happens, second touch -> click). If you want to try this option uncomment
Ok, let me know when you figured it out. Generally, I would be interested what it is, since I thought I understood the program structure. But please keep in mind that I am happy to contribute instead of just requesting features, but I am still doing this in my free time. So, if you already have some plan in your mind and depending on the extent of restruturing, it might be even easier for you to restructure it even directly by your own afterwards, instead of explaining me first. :) |
There is always a chance for something to go wrong. Never trust Android 😉 As for the unsupported keys, there is no reason to throw an error. Just ignore them. This is a normal scenario, not an error. For example, your remote control has many keys that TT9 does not support, but it only looks for the ones that it knows about and ignores the rest. It's as simple as that.
May I suggest a different approach? I understand you are trying to make TT9 usable on a TV. But the TV is not a touchscreen device, so I think creating a touchscreen UI, then adapting it for a non-touchscreen device isn't an optimal solution. You want to see the full-sized keyboard for touchscreens and use it only because of the hotkey hints and that's fine. But why don't we add support for more keys on the remote (volume up/down, next/previous channel and other common ones)? There are plenty of choices there. And then, just like you have labelled each number key with the letters it supports, also label each TT9 function key (the gear, the planet, etc) with the corresponding hardware key? For example, we can display "planet" and below it "volume up" or whatever you have configured. I think this way it will quite be clear how to access a function and there will be no need to change anything "outside" the softkey scope. Two birds with one stone! Of course, displaying the extra labels must be a configuration option, not to ruin the experience on small screens.
The SoftKeyHandler... I was indeed thinking restructing it, indeed. Sort of like in I am really eager to start using TT9 on my large smartphone (I hate QWERTY 😬), so I say, let's do finish this off! I can join as soon as I deal with the newly reported bugs. |
I have invited you to the repository. I believe, we can work easier if you create a branch here. But if you prefer "the Github" way, it is perfectly fine to ignore the invitation. |
Thank you. I am happy to join - but since I am still quite new to github you may have to give me a hint how to best work with the different tools. Since I didn't found a way to redirect this pull request directly, I created a new one and close this on. |
Oh, maybe closing was too early...
Good point ;) Ok, a Log.e(...) message should be good enough and would not cause any breakdowns. I will change it this way.
True, I guess this was just too easy for my mind 😂
Yes, this would be anyway good! I just still didn't get yet how to add new keys, and already thought one step further. Best would be an option to just push the button we want to configure (I saw such an approach in a different app), so no need for pre-defined buttons or scrolling. But I didn't had time yet to dig deeper how to enable this. Maybe with a special preference which listens for key inputs... But since you already know how to add a key and therefore it will be (hopefully) pretty easy for you, it would be great if you could add more. I will try to find out which key events would be useful.
Feel free to restructure it :) |
I don't think it is possible when you had opened a PR from one repo to another. It doesn't matter, just open some pull request, so we can chat there. If I haven't answered or have forgotten about some of your questions, just copy them and I'll do there. Now, regarding the long press to type a number, this may not be strictly necessary on touchscreen keyboard. From what I saw, all other keyboards, require manually switching to numeric mode to type numbers, which means we are all good in this regard. |
It is not exactly as in your suggestion from #159, but similar to it. Avoiding the left control column give more room for the buttons. In order to include more options with avoiding a second control row long presses on the existing control buttons might be an option.