06-06-2022, 05:21 PM | #1 |
Member
Posts: 24
Karma: 10
Join Date: Apr 2022
Device: Onyx Boox Note Air 2
|
physical keyboard problem in note air 2
Hello everyone
I bought a keyboard for my Boox note air 2 recently. I changed the physical keyboard layout to Persian, but it is still in English. IT WORKS when I change it to other languages, but Persian doesn't work. I can use the Persian language on the (virtual) Android Keyboard, but using the physical keyboard, I can't. Thanks in advance |
06-06-2022, 07:46 PM | #2 |
Wizard
Posts: 2,305
Karma: 9599999
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
You got me scratching my head. Since Android is (basically) Linux you can do this the Linux way. That's the way I've always done it. Then I realized that there is the Android Setting with selecting keyboard layout. I can only presume that that's done after the Linux system has already mapped things around. Gee, that makes things complicated. The attached drawing shows how it works without the Android Settings. The Android Settings is yet another layer!
I tried the Android Settings under System/Languages/Physical Keyboard and it works. In the Linux world we have key layout files (*.kl) and key chararacter maps (*.kcm). For Android we also have input device configuration files (*.idc). These are all found in /system/usr/keylayout, /system/usr/keychars and /system/usr/idc (respectivelly). To make your own files your device will need to be rooted or Magisk-ed. Whether you are using a wired USB keyboard or a Bluetooth keyboard really doesn't make a difference. USB was/is the standard and Bluetooth pretends that it is (kind of) a USB keyboard. Both are identified by a vendor ID (VID) and a product ID (PID). So here's my Vendor_05ac_Product_0220.idc file: Code:
# Configuration for Russian Bluetooth keyboard 05ac/0220 device.internal = 0 keyboard.layout = Generic keyboard.characterMap = Russian Here is a part of my Russian.kcm: Code:
key J { label: 'J' base: '\u043e' shift, capslock: '\u041e' } So, in short, to answer your actual question. You can definitely do this the Linux way (if you're rooted/Magisk-ed). If the Android Settings lets you set the keyboard to Japanese and Russian but not Persian then the Settings is not going to help you. It might just be a case of different Perisan keyboards. I just learned that you can write an app for injecting your own key character maps. For the real dirt on that, see: https://developer.android.com/refere...YBOARD_LAYOUTS Since I'm already rooted and customized I'll stick with my method. |
Advert | |
|
06-07-2022, 01:34 AM | #3 |
Member
Posts: 24
Karma: 10
Join Date: Apr 2022
Device: Onyx Boox Note Air 2
|
Thanks a lot for your time and your helpful information, dear Guru. Honestly, I'm not an expert and didn't understand some parts of your text.
I changed the keyboard layout to Persian, as you see in the attached screenshot. But still, when I type, It is English. As I told you, other languages (like Arabic and Hebrew) work correctly. I also tested my physical keyboard with other devices, and everything was fine with Persian language typing on those other devices. Can I just paste a Persian .kcm file in /system/usr/keychars if I can find it? Will it solve the problem? Is it just doable if my device is rooted? Isn't there any way if it's not rooted? Thanks again and sorry for the fundamental questions |
06-07-2022, 08:15 AM | #4 |
Wizard
Posts: 2,305
Karma: 9599999
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
Well, I learned me some about all this stuff.
This file is actually an .apk Just rename it from .prc to .apk when you download it. Just install it. Go to System > Languages > Physical Keyboard and select Persian, Temblast KeyMaps. It works for me, I get illegible squiggles. Apparently the stock Persian is broken or just English. Edit: In /system/priv-app/InputDevices/InputDevices.apk there is a error in res/raw/keyboard_layout_persian.kcm They have "type FULL" when they should have "type OVERLAY". I just updated the keymap in my app to use the fixed Android version. Check the filesize, the new version is 14,448 bytes. The MD5 is 9956d99869adb82e1b8d2ffa886ad51d See below for latest version. There are 40 keylayouts in InputDevices.apk and Persian is the only one with this error. Last edited by Renate; 06-07-2022 at 06:56 PM. |
06-07-2022, 05:59 PM | #5 |
Member
Posts: 24
Karma: 10
Join Date: Apr 2022
Device: Onyx Boox Note Air 2
|
Thank you so much, dear Guru. I really appreciate your kind help. That worked great. The only problem is there are some differences. For example, there is no "گ" (a Persian letter) on this keyboard. It is on the " key (on the left side of Enter key) in the Standard Persian Keyboard. Is there any possibility of changing them and/or finding other keymaps Apk files compatible with the Persian keyboards?
Can I send your explanation to Boox Help so that they fix it in their next firmware? |
Advert | |
|
06-07-2022, 06:13 PM | #6 |
Wizard
Posts: 2,305
Karma: 9599999
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
Ok, so, you want the Arabic Letter Gaf (U+06AF) on the ['/"] key.
You've got your Gaf. Apostrophe is Alt ['/"]. Fixed up semicolon and square brackets too, they are now Alt keys. I don't understand why all the parenthesis, braces and brackets are backwards, but that seems to be intentional. Latest version is 14,468 bytes MD5 = 1baa0b39d9fa8f40d12e1036cca6c69c Rename file from .prc to .apk Last edited by Renate; 06-07-2022 at 07:01 PM. |
06-08-2022, 05:19 PM | #7 |
Member
Posts: 24
Karma: 10
Join Date: Apr 2022
Device: Onyx Boox Note Air 2
|
Thanks again. Everything is great Guru, it was impossible for me to do that. I am more than grateful to you. I just wanted to ask another question, I appreciate it if you help me with that. There is another Persian keyboard that has some subtle differences from the one you shared (in Windows the former is named "Persian" and the latter (yours) is "Persian (Standard)". For example, the Arabic Letter Peh ("پ") is on the [\/|] key on the Persian keyboard, but on the [M] key on the Persian Standard keyboard. Is there possible to have the other one (Persian) in this app?
|
06-08-2022, 07:07 PM | #8 |
Wizard
Posts: 2,305
Karma: 9599999
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
I don't know Persian.
If you're talking about some key should be something else, that displaces something else too. You have to come up with a clear list of all the changes and you should reference them by Unicode. On Windows you can look them up by "charmap". |
06-09-2022, 02:51 PM | #9 |
Member
Posts: 24
Karma: 10
Join Date: Apr 2022
Device: Onyx Boox Note Air 2
|
Thank you very much. I will try to find the details and probably come back to you.
|
06-09-2022, 09:52 PM | #10 |
Wizard
Posts: 2,305
Karma: 9599999
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
I wrote a utility for displaying keymaps. This is what you currently have.
Edit: The four dots above the 'B' key are to indicate the U+200C Zero Width Non-Joiner (which would be invisible). Edit^2: If anybody would like a printout of a stock Onyx keyboard layout, just ask. Available: Code:
arabic azerbaijani belgian brazilian bulgarian croatian_and_slovenian czech danish english_uk english_us english_us_colemak english_us_dvorak english_us_intl english_us_workman estonian finnish french french_ca german greek hebrew hungarian icelandic italian latvian_qwerty lithuanian norwegian persian polish portuguese russian russian_mac slovak spanish spanish_latin swedish swiss_french swiss_german turkish ukrainian Last edited by Renate; 06-10-2022 at 11:28 AM. |
06-11-2022, 09:56 AM | #11 |
Wizard
Posts: 2,305
Karma: 9599999
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
Hey! Here's some more fun: an interactive version of these layout diagrams.
It's in SVG format. It will work on Firefox, Chrome and Microsoft Edge, probably others. Since the forums won't upload SVG, I've renamed them XML (which is actually what SVG files are). My Firefox is smart enough to open them and realize that it's SVG. If your browser can't, just rename them .svg Just mouse over a letter and it will tell you what Unicode character it is. Edit: Yet more progress. The official Unicode name for the character will appear when you hover. More fine-tuning. Last edited by Renate; 06-12-2022 at 07:35 PM. |
06-13-2022, 08:26 PM | #12 |
Member
Posts: 24
Karma: 10
Join Date: Apr 2022
Device: Onyx Boox Note Air 2
|
Hello again, and thanks a lot for your exciting information and files. the Persian Keyboard that I told you about (which is a little bit different from the Persian Standard keyboard- which you shared) is described and showed here
|
06-14-2022, 08:22 AM | #13 |
Wizard
Posts: 2,305
Karma: 9599999
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
Ok, here you go. I've renamed things slightly so uninstall the last version:
Code:
C:\>adb uninstall com.temblast.keymaps C:\>adb install KbdMaps-1.0.apk (Just rename the .prc file .apk, just rename the .xml file .svg) |
06-14-2022, 02:29 PM | #14 |
Member
Posts: 24
Karma: 10
Join Date: Apr 2022
Device: Onyx Boox Note Air 2
|
Thanks a lot for your prompt and helpful reply. Everything is awesome. I just faced two issues, and I truly appreciate it if you help me with them too:
1. In Persian (Onyx) there is no Arabic Letter Gaf (U+06AF) on the ['/"] key. 2. In Persian (MS) I couldn't find the Zero Width Non-Joined (U+200C). In Persian (Onyx) it is on Alt [B] key, as you mentioned before. In Persian (MS) it could be on Alt [-/_] key (activated by pressing Shift and [-/_] key) and on Ctrl + Shift + [2/@] key. Best |
06-14-2022, 05:31 PM | #15 |
Wizard
Posts: 2,305
Karma: 9599999
Join Date: Feb 2012
Device: Nook NST, Glow2, 3, 4, '21, Kobo Aura2, Poke3, Poke5
|
Alt-2 is ZWNJ
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Help with Note Air 2 | Newby31 | Onyx Boox | 7 | 12-08-2021 06:00 AM |
[K3] Physical keyboard localization | Sir Alex | Kindle Developer's Corner | 112 | 05-19-2018 11:23 PM |
E-Ink Keyboard Concept Marries Best Of Touch And Physical Keys | amjbrown | News | 22 | 02-05-2013 12:06 AM |
Tablet Anyone aware of physical keyboard options for the Nook Tablet line? | bfollowell | Nook Color & Nook Tablet | 2 | 11-09-2012 05:06 AM |
New Kindles = no physical keyboard?? | sparrowlight | Amazon Kindle | 65 | 09-28-2011 06:29 PM |