OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Keyboard Mod
greguu
post Apr 8 2018, 07:25 PM
Post #1





Group: Moderators
Posts: 374
Joined: 14-November 05
From: New Zealand
Member No.: 8,535



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

Google Translate :
QUOTE
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

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:

Go to the top of the page
 
+Quote Post
Varti
post Apr 9 2018, 01:26 AM
Post #2





Group: Admin
Posts: 937
Joined: 30-April 08
From: Italy
Member No.: 21,713



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 smile.gif ). The above instructions of the fixes in Generic.kl are also useful for any type of key remapping.

Varti
Go to the top of the page
 
+Quote Post
jakfish
post Jul 10 2018, 06:22 AM
Post #3





Group: Members
Posts: 271
Joined: 12-September 10
Member No.: 91,772



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?
Go to the top of the page
 
+Quote Post
gidds
post Jul 10 2018, 11:39 AM
Post #4





Group: Members
Posts: 283
Joined: 13-January 18
From: UK
Member No.: 816,386



QUOTE(Varti @ Apr 9 2018, 10:26 AM) *
it reminds me of the cursor keys layout over the 5, 6, 7 and 8 keys on the ZX Spectrum (yes, I'm old smile.gif ).

It's also like the key mappings in the vi/vim editor (H, J, K, L = ←, ↓, ↑, →).  Which are apparently based on arrows printed on those keytops on the terminal 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])
Go to the top of the page
 
+Quote Post
abliss
post Aug 29 2018, 06:08 PM
Post #5





Group: Members
Posts: 12
Joined: 12-June 18
Member No.: 824,349



QUOTE(gidds @ Jul 10 2018, 03:39 PM) *
QUOTE(Varti @ Apr 9 2018, 10:26 AM) *
it reminds me of the cursor keys layout over the 5, 6, 7 and 8 keys on the ZX Spectrum (yes, I'm old smile.gif ).

It's also like the key mappings in the vi/vim editor (H, J, K, L = ←, ↓, ↑, →).  Which are apparently based on arrows printed on those keytops on the terminal 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?
Go to the top of the page
 
+Quote Post
abliss
post Sep 5 2018, 07:56 PM
Post #6





Group: Members
Posts: 12
Joined: 12-June 18
Member No.: 824,349



QUOTE(abliss @ Aug 29 2018, 10:08 PM) *
QUOTE(gidds @ Jul 10 2018, 03:39 PM) *
QUOTE(Varti @ Apr 9 2018, 10:26 AM) *
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 are apparently based on arrows printed on those keytops on the terminal 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 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

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.
Go to the top of the page
 
+Quote Post
abliss
post Sep 8 2018, 06:15 PM
Post #7





Group: Members
Posts: 12
Joined: 12-June 18
Member No.: 824,349



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
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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 6th December 2019 - 12:26 AM