OESF Portables Forum
Model Specific Forums => Gemini PDA => Gemini PDA - Hardware => Topic started by: greguu on April 08, 2018, 11:25:26 pm
-
Interesting keyboard Mod. The howto is for Android but can be done also for other platforms.
Source : https://egg.5ch.net/test/read.cgi/notepc/1520308917/750 (https://egg.5ch.net/test/read.cgi/notepc/1520308917/750)
Google Translate :
Changing the key mapping on Android
Because it is a file rewrite in the / system partition, you need root privilege as a prerequisite.
There is a definition file in / system / usr / keylayout and / system / usr / keychars.
If you simply replace the key, rewrite the keylayout and restart it OK.
In my case, because I want to replace ". ↑, ← ↓" in the bottom two columns with US array, I need to create the following 5 lines of Generic.kl
key 51 COMMA
key 52 PERIOD
key 103 DPAD_UP
key 105 DPAD_LEFT
key 108 DPAD_DOWN
Rewrite as follows.
key 51 DPAD_LEFT
key 52 COMMA
key 103 PERIOD
key 105 DPAD_DOWN
key 108 DPAD_UP
It will become such an arrangement if restarted. comfortable.
https://imgur.com/a/ufief (https://imgur.com/a/ufief)
I do not have it so I do not know what the definition file of the Japanese keyboard is.
IME on / off code should be different for IME.
In Droid 4 + ATOK, it assigns GRAVE and switches with one SYM key.
Since Gemini does not have a good key, I plan to go with the default Alt + Space.
Photo:
[img]https://i.imgur.com/3IPpmKt.jpg\" border=\"0\" class=\"linked-image\" /]
-
Thanks for sharing. So basically they have rearranged the keys in this way (key -> place):
question mark -> up
up -> down
down -> left and
left -> question mark.
Interesting mod, it reminds me of the cursor keys layout over the 5, 6, 7 and 8 keys on the ZX Spectrum (yes, I'm old ). The above instructions of the fixes in Generic.kl are also useful for any type of key remapping.
Varti
-
I'm pondering this mod. I do feel the comma is misplaced, though I'm not certain I want the Up arrow on the same row as the rest of the arrows. Might be too much of a jumble.
Anybody else rearranged their physical keys, or considered it?
-
it reminds me of the cursor keys layout over the 5, 6, 7 and 8 keys on the ZX Spectrum (yes, I'm old ).
It's also like the key mappings in the vi/vim editor (H, J, K, L = ←, ↓, ↑, →). Which (https://en.wikipedia.org/wiki/Arrow_keys#HJKL_keys) are apparently (https://en.wikipedia.org/wiki/Vi#Creation) based on arrows printed on those keytops on the terminal (https://en.wikipedia.org/wiki/ADM-3A) Bill Joy was using when he wrote it.
(And that predates the Spectrum by a few years! Though I didn't get to use it until many years later; our first computer was a ZX81. After that we got a BBC Micro — now that was an amazing machine! [Half-hour reminiscence redacted])
-
it reminds me of the cursor keys layout over the 5, 6, 7 and 8 keys on the ZX Spectrum (yes, I'm old ).
It's also like the key mappings in the vi/vim editor (H, J, K, L = ←, ↓, ↑, →). Which (https://en.wikipedia.org/wiki/Arrow_keys#HJKL_keys) are apparently (https://en.wikipedia.org/wiki/Vi#Creation) based on arrows printed on those keytops on the terminal (https://en.wikipedia.org/wiki/ADM-3A) Bill Joy was using when he wrote it.
(And that predates the Spectrum by a few years! Though I didn't get to use it until many years later; our first computer was a ZX81. After that we got a BBC Micro — now that was an amazing machine! [Half-hour reminiscence redacted])
I've been tweaking my Generic.kl for weeks trying to find the best layout. My problem is that I really want to change Capslock to Ctrl and right shift to z (for dvorak) and I can't seem to make it happen. Has anyone had any luck with those? Or does it require a kernel change?
-
it reminds me of the cursor keys layout over the 5, 6, 7 and 8 keys on the ZX Spectrum (yes, I'm old :) ).
It's also like the key mappings in the vi/vim editor (H, J, K, L = ←, ↓, ↑, →). Which (https://en.wikipedia.org/wiki/Arrow_keys#HJKL_keys) are apparently (https://en.wikipedia.org/wiki/Vi#Creation) based on arrows printed on those keytops on the terminal (https://en.wikipedia.org/wiki/ADM-3A) Bill Joy was using when he wrote it.
(And that predates the Spectrum by a few years! Though I didn't get to use it until many years later; our first computer was a ZX81. After that we got a BBC Micro — now that was an amazing machine! [Half-hour reminiscence redacted])
I've been tweaking my Generic.kl for weeks trying to find the best layout. My problem is that I really want to change Capslock to Ctrl and right shift to z (for dvorak) and I can't seem to make it happen. Has anyone had any luck with those? Or does it require a kernel change?
Good news, I've been able to (a) switch Tab/Caps and Control, and (b) turn the right-hand Shift key into a "normal" (mappable, character) key! The necessary changes to this file were pretty obvious: https://github.com/zevv/gemini-android-kern...23/aw9523_key.c (https://github.com/zevv/gemini-android-kernel-3.18/blob/680e9de95e6b83bf2c23fd47056977d707dd5a15/drivers/misc/mediatek/aw9523/aw9523_key.c) and the instructions to build and flash a new bootimage were very clear and easy to follow: https://github.com/zevv/gemini-android-kern...aster/README.md (https://github.com/zevv/gemini-android-kernel-3.18/blob/master/README.md)
Thanks zevv!
edit: in order for my changes to Generic.kcm and Generic.kl to fully take effect, I found I had to delete /system/priv-app/GeminiInputDevices and /vendor/operator/app/Gemini_Keyboard, and also /system/usr/keychars/Virtual.kcm. And even then, I can only change the "fn" key mapping for some of the keys, not others.
-
Okay, I'm at my wit's end. Has anyone managed to get a non-qwerty layout to work properly with ctrl and fn?
Some keys have fn-chords with behavior, like play, volume, brightness. And some keys have ctrl-chords with behavior, like ctrl-c for copy and ctrl-v for paste.
As far as I can see, both of these are implemented atop the android key codes, not the mapped characters. So KEY_V, while it may be emitted from any of the physical key switches (via kernel patch and/or kl file), and may have any different physical label on the keycap, and may be mapped to another character for typing (via kcm file), is still the key you use with ctrl for paste, and the key you use with fn for volume-up.
But some keyboards, like dvorak, have the volume-up label on a different keycap than the letter V. No amount of messing with the kernel scancode map, or the kcm character map, or the kl keylayout, seems able to rectify this. It seems I need to make a change somewhere in android's input layer, and Planet hasn't released the source for their build (have they?).
For example, I'm guessing they may have added code here:
https://android.googlesource.com/platform/f...nager.java#2660 (https://android.googlesource.com/platform/frameworks/base/+/d5bb82d18cbd95bb9e751d8315b9ed0b69595033/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java#2660)
to take the screenshot only when KEYCODE_R is pressed. But on the dvorak layout, the key that takes a screenshot is P. So they must be using kcm to tell android that KEY R has base: 'p'. But then you won't be able to use ctrl-c/ctrl-v for copy/paste. And indeed, on my device with dvorak keycaps, it doesn't work (I can either have the fn keys work or the ctrl keys work, but not both.)
The same problem should apply to AZERTY users. Are you able to use ctrl-a for select all in gmail or chrome? Are you able to use ctrl-w to close a chrome tab? It seems impossible to support this while also supporting fn-A for MEDIA_PLAY_PAUSE and fn-Z for MEDIA_PREVIOUS, as is painted on the keycaps.
Any pointers would be much appreciated.