Author Topic: Keyboard ghosting  (Read 8006 times)

ali1234

  • Newbie
  • *
  • Posts: 19
    • View Profile
Keyboard ghosting
« on: May 23, 2018, 01:47:39 pm »
The Gemini keyboard seems to not have any diodes to prevent ghosting. For example with UK keymap if you press any three of the keys E, R, O, 0, then the fourth key will also be triggered. This can be confirmed to be a hardware bug by running "adb getevent /dev/input/event2" and holding down E, R, and O.

https://deskthority.net/wiki/Rollover,_blocking_and_ghosting provides an explanation of why ghosting happens.

There are many combinations of keys which do this. The most annoying is probably SHIFT, 9, 0, C, which is easily triggered if you try to type "()" because you are writing code...

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
    • View Profile
Keyboard ghosting
« Reply #1 on: May 24, 2018, 10:37:26 am »
I have now updated the list of HW/SW issues with the problem you have encountered. This problem might become an annoyance in tracker programs (for music) like Milkytracker, where you can use the keyboard as a virtual piano and you often press two or more keys at once.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

zevv

  • Newbie
  • *
  • Posts: 48
    • View Profile
Keyboard ghosting
« Reply #2 on: July 20, 2018, 07:33:27 am »
For the brave: I have created a Android boot image which has a fix for this issue.

You can find the image here:

https://github.com/zevv/gemini-android-kern...nux_boot-v1.img

Install with flashtool by downloading only the 'boot' partition and unticking the rest.

The original fix was made by Nathan Banks, I just took his code into the Android kernel source and built an image. It works fine for me, but use at your own risk, things might break.
« Last Edit: July 20, 2018, 12:05:43 pm by zevv »

Murple2

  • Full Member
  • ***
  • Posts: 137
    • View Profile
Keyboard ghosting
« Reply #3 on: July 20, 2018, 10:28:22 am »
Quote from: zevv
For the brave: I have created a Android boot image which has a fix for this issue.

You can find the image here:

https://github.com/zevv/gemini-android-kern...nux_boot-v1.img

Install with flashtool by downloading only the 'boot' partition and unticking the rest.

The original fix was made by Nathan Banks, I just took his code and built the image. It works fine for me, but use at your own risk, things might break.

Thanks that's really awesome. Can you post a link to Nathan Banks' code, or explain the fix?

zevv

  • Newbie
  • *
  • Posts: 48
    • View Profile
Keyboard ghosting
« Reply #4 on: July 20, 2018, 11:31:34 am »
Quote from: Murple2
Thanks that's really awesome. Can you post a link to Nathan Banks' code, or explain the fix?

Of course, here is his original pull request on Gemian (which has not been merged yet): https://github.com/gemian/gemini-linux-kernel-3.18/pull/2

Quote
The Gemini PDA keyboard has 2-key roll-over. That means that if 3 or more keys are pressed down in some combinations, four keys will actually be detected. One example is that if K+J+D are pressed simultaneously, the old driver will produce K+J+S+D. Since I usually use the Dvorak layout, this meant that often if I typed "the" or "those" Gemini would produce "thoe" or "thoese" because I'm lazy about lifting up keys. It also meant that Control + L_Shift + M & N can't be differentiated from each other.

Instead of adding extra keys (ie. Ghosting) my changed driver now blocks the extra keys, however the keypress is registered if one of the first two keys is released before the third. Thus "the" in Dvorak is much easier to type, and Control+L_Shift+M will be recorded as long as the Shift or Control is released before the M. Unfortunately this is the best we can do without redesigning the keyboard matrix. I also changed the formatting to match the Linux Kernel.

See youtu.be/L3ByBtM-w9I for a description of why keyboard Ghosting happens.

abliss

  • Newbie
  • *
  • Posts: 32
    • View Profile
Keyboard ghosting
« Reply #5 on: September 05, 2018, 01:10:12 pm »
Quote from: zevv
Quote from: Murple2
Thanks that's really awesome. Can you post a link to Nathan Banks' code, or explain the fix?

Of course, here is his original pull request on Gemian (which has not been merged yet): https://github.com/gemian/gemini-linux-kernel-3.18/pull/2


I just flashed this boot image and it works great. The ghosting is gone. Thanks a million!

Would you be willing to link to a description of how you rolled this kernel into a new boot image?

zevv

  • Newbie
  • *
  • Posts: 48
    • View Profile
Keyboard ghosting
« Reply #6 on: September 06, 2018, 09:18:13 am »
Quote
I just flashed this boot image and it works great. The ghosting is gone. Thanks a million!
Would you be willing to link to a description of how you rolled this kernel into a new boot image?

It's in the readme of my repo: https://github.com/zevv/gemini-android-kernel-3.18, check the section 'Building'

gidds

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
Keyboard ghosting
« Reply #7 on: October 30, 2018, 07:30:03 am »
I'm still getting ghosting after upgrading to the latest official firmware (Gemini-7.1-Planet-08102018-V2).

I can reliably demonstrate it with only 3 keys: hold down right-Shift, press F, and then press S before releasing the F.  It registers a spurious ~, giving: FS~
   Andy/
Psion 3a → Psion 5 → Psion 5mx → Gemini → Astro

salvomic

  • Sr. Member
  • ****
  • Posts: 290
    • View Profile
Keyboard ghosting
« Reply #8 on: October 30, 2018, 07:33:24 am »
Quote from: gidds
I'm still getting ghosting after upgrading to the latest official firmware (Gemini-7.1-Planet-08102018-V2).

I can reliably demonstrate it with only 3 keys: hold down right-Shift, press F, and then press S before releasing the F.  It registers a spurious ~, giving: FS~

with right Shift I get FSé, with left Shift FS
Gemini, Psion S5 and S5mx, iPhone, iPad, Huawei MediaPad M5, some HP calculators.
Psion Fans Italia moderator