Author Topic: One Way to Remap Keyboard  (Read 5275 times)

jakfish

  • Sr. Member
  • ****
  • Posts: 394
    • View Profile
One Way to Remap Keyboard
« on: July 09, 2018, 12:04:50 pm »
On the US keyboard, the back slash and vertical line, for some reason, have their own key. Since I write prose more than programs, I much preferred those keys to be brought up by an fn keystroke and in their place, I wanted a simple quote and double-quote key. I sacrificed the fn call of the Pound and Euro sign (apologies to my European friends) and replaced said keys with back slash and vertical line respectively.

To start me off, I found:

https://translate.google.com/translate?hl=e...amp;prev=search

and followed this fellow's instructions as best I could. For openers, you've got to download gbs of Android Studio and its plugins. So space beware.

Long story short: by extracting, then editing the keyboard kcm file (for your specific keyboard) from the /raw directory in "Gemini Keyboard  1.0.24.apk" (using 7-Zip File Manager), you can build a basic Hello World apk that will install a new keyboard layout (without overwriting any existing kcm) and you can choose that layout from Physical Keyboard settings. Make certain that your new, edited kcm has its own unique name, or an overwrite could happen.

I found this procedure to be both fascinating and a huge learning curve. If someone decides to be intrepid but gets stuck, I'm happy to email my 10mb source file for this apk (apk itself is 1.5mb). Theoretically, you should be able to drop your edited kcm file in my source's /raw directory, rebuild the source with Android Studio, and create a working apk that has your own keyboard remapping.

Changing certain keys is probably not of interest to most users, but for me, the fn-M to get a simple apostrophe was driving me to distraction. That, and I like to tweak keyboards.

Also theoretically, if you're root, you should be able to simply edit the specific kcm file (eg: keyboard_layout_english_us_intl_gemini.kcm) on the Gemini itself with no apk stuff. But my searches never turned up anything other than the generic kcms. Perhaps Gemini converts the kcm to an xml hidden somewhere, I just don't know.

At any rate, pm me if you want the source, and I take no responsibility for anything that ensues,
Jake
« Last Edit: July 09, 2018, 12:16:02 pm by jakfish »

graynada

  • Full Member
  • ***
  • Posts: 117
    • View Profile
One Way to Remap Keyboard
« Reply #1 on: July 09, 2018, 01:47:35 pm »
Glad you got it working

loop

  • Newbie
  • *
  • Posts: 19
    • View Profile
One Way to Remap Keyboard
« Reply #2 on: July 09, 2018, 02:09:15 pm »
Using ApkTool to extract the resources from and to rebuild the Gemini Keybosrd apk might be simpler.

jakfish

  • Sr. Member
  • ****
  • Posts: 394
    • View Profile
One Way to Remap Keyboard
« Reply #3 on: July 09, 2018, 04:03:30 pm »
Yup, I think just about anything else would've been easier

I came at this as a total novice, but in my vague defense, I was amazed that I couldn't find the needed kcms in /system or wherever. When I've remapped other rooted phones, the layouts were right there, you edited them in Total Commander, rebooted, and that was that.

Jake
« Last Edit: July 09, 2018, 04:04:43 pm by jakfish »

abliss

  • Newbie
  • *
  • Posts: 32
    • View Profile
One Way to Remap Keyboard
« Reply #4 on: July 09, 2018, 09:41:04 pm »
Quote from: jakfish
I'm happy to email my 10mb source file for this apk (apk itself is 1.5mb).
I'd love if you could put it up on gitlab. I got the dvorak keyboard and it i- all wrong.

And! How to turn off the awful key vibration!

gidds

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
One Way to Remap Keyboard
« Reply #5 on: July 10, 2018, 05:02:38 am »
Quote from: abliss
And! How to turn off the awful key vibration!
Gemini Keyboard app → Preferences → Vibrate on keypress.
   Andy/
Psion 3a → Psion 5 → Psion 5mx → Gemini → Astro

graynada

  • Full Member
  • ***
  • Posts: 117
    • View Profile
One Way to Remap Keyboard
« Reply #6 on: July 10, 2018, 06:18:35 am »
Quote from: gidds
Quote from: abliss
And! How to turn off the awful key vibration!
Gemini Keyboard app → Preferences → Vibrate on keypress.
All of the above then reboot 👍

gidds

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
One Way to Remap Keyboard
« Reply #7 on: July 10, 2018, 06:31:16 am »
Quote from: graynada
All of the above then reboot 👍
What He/She Said  

This sort of thing should be in an FAQ, of course.  Is there an existing one somewhere?
   Andy/
Psion 3a → Psion 5 → Psion 5mx → Gemini → Astro