-
-
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
Add support for Microsoft Bluetooth number pad #151
Comments
That's right, the scan codes do not match the Android standard. But this looks like a computer keyboard designed for Windows, so I wouldn't expect it to work properly on Android. TT9 processes the key codes in this file, where Now, I guess what you want is doable by simply replacing the constants with Microsoft key codes. But! There must also be a way of detecting this particular keyboard and reading its' codes only when it is connected. It's because Microsoft and Android codes are in conflict and trying to read both will cause undesired side effects. For example, Microsoft "0" = Android "MENU", Microsoft "3" = Android "+" and so on... Actually, I am not sure whether "scanCode" or "code" from your dump should be used, but either way, the codes are non-standard. Bottom line is, I don't think I would be able to do it, without having the keyboard in my hands. Also, using a Microsoft keyboard on Android is trully an exceptional use case and supporting it feels like too much effort, especially given the fact I am working on this project in my free time. However, you are welcome to fork the project, replace the key codes as I explained above and hopefuly make it run as you want.
I've been looking high and low, but I haven't found one. 🙁 I've heard good words about Type Nine, but it is for iPhone. |
What number pad do you use? Back in the day, this Microsoft keypad was one of the most common (which is why I got it). It's just a Bluetooth device, so connecting it to an Android device isn't any problem. I captured the keycodes using this app (I omitted values that were all set to 0): What information would you need from the device? I can dump the dmesg data if that would help. Otherwise, I may try building it myself. Lastly, if you felt like taking a crack at the HTC IME that I mentioned, the developer posted the source to his website. It was the most Nokia XT9-compatible keyboard I'd ever used: The original thread was here: |
Ah - I didn't realize that they still made Android devices with an attached number pad. I know flip Android phones are popular in Japan. I once tried to figure out how their IME works so I could write a T9 IME for touch screens, but I'm a web developer, not an Android developer (I tinker a little here and there, though). I always thought it would be nice to have an external number pad to type while your phone is in a mount in front of you. Also, it is tactile, so it would make T9 typing easier than a touch screen. That's why I bought my keypad and found this app. What are your thoughts on the HTC IME? I think I tried to build it awhile back, but I didn't know much about Android development back then. I might have more success if I tried again, now. |
There have always been. And TT9 is made exactly for them. I couldn't find any other free and well-working keyboard for Android, this is why I decided to hack on this project and make it better. I actually use it as the primary keyboard on my phone now.
I took glimpse of the code and I wasn't so impressed. There several small classes and a huge one that contains all the logic. It's some 5000 lines long. Personally, I don't like such huge files that do everything. But let's assume you are OK with the above. In that case, based on my initial experience with TT9, you may face issues building the project, because it was used with a very old version of Android and Android Studio. I had to upgrade all dependencies and refactor some code, that was no longer compatible with newer SDKs, to make it work. I am not saying it will be the same, but there is a high chance of that. Still, if you feel like having fun, go ahead and do it. I did the same and despite it was more effort than I anticipated, I am now happy. My phone works exactly the way I want it to work. And it will be the same when I buy a new one! Also, there is a large community of people who dislike touchscreens. I am happy to make their phones usable too.
I'm a web developer too, but I had three months of free time in 2022 and thought to myself it would be fun to learn something completely new. I had no idea what I was doing at the beginning. I still don't... 😄 |
Scratch the above, #169 made me realize Android supports more than one key for the same function and it is in fact still by the standard. There is nothing special about the Microsoft keyboard and there is no need to detect it in a special way. So in order to support it:
|
In the |
Right. I just wrote some notes while I was on the move, not to forget how to do it. |
I have added support for all numpad keys, except Num Lock. It's going to be trickier than the rest, so I am leaving it for now. @summersab, feel free to try out |
I'm impressed that you have resurrected this project. Almost a decade ago, I bought a Microsoft Bluetooth number pad (CDY-00001) and attempted to get it to work. However, it would only ever type numbers no matter what I did. I suspect this app doesn't support the key/scan codes of this particular number pad.
I dumped the keycodes using an app I found, and this is what it produced:
Let me know if you need any further information from me.
On a related note, can you recommend a good on-screen predictive T9 keyboard? Long ago, I used the HTC IME, but it has been abandoned for at least a decade:
https://forum.xda-developers.com/t/mod-htc_ime-mod-v28-v29-v30-v30-1-v31.1844512/
Thanks!
The text was updated successfully, but these errors were encountered: