Jump to content

Spurious long presses of the Pro1 keyboard


Recommended Posts

Hi,

I noticed that sometimes while typing on the Pro1 a key gets "stuck" and produces input for ~1s after it's been released. This happens on both stock and LineageOS.

In such a situation, I'd get many repetitions of a letter on stock (for instance: rubbbbbbbbbbbbbbb when typing rubbish or lauggggggggggggggg when typing laugh). On LineageOS, this is registered as a long key press, which triggers the diacritic selection dialog.

It's a total bummer when trying to get decent writing speeds.

Is this some driver issue F(x)tec is aware of or is it a hardware issue?

  • Like 1
Link to post
Share on other sites
1 hour ago, marmistrz said:

Hi,

I noticed that sometimes while typing on the Pro1 a key gets "stuck" and produces input for ~1s after it's been released. This happens on both stock and LineageOS.

In such a situation, I'd get many repetitions of a letter on stock (for instance: rubbbbbbbbbbbbbbb when typing rubbish or lauggggggggggggggg when typing laugh). On LineageOS, this is registered as a long key press, which triggers the diacritic selection dialog.

It's a total bummer when trying to get decent writing speeds.

Is this some driver issue F(x)tec is aware of or is it a hardware issue?

 

I've never seen or heard of such an issue.  Does this happen for just a couple particular keys or for all keys?

 

If it happens for only a few keys, it is most likely a hardware issue.

 

If it happens for all keys, it's more likely to be a software issue.  But tracking it down may be a challenge.

 

  • Thanks 1
Link to post
Share on other sites

Is it for any input field or bound to one or a few specific apps?

If specific apps, they just might not work well with a physical keyboard.
On stock repetitions usually ends immediately as the key is released. BUT if an app (for whatever reason)) does not handle/show the keys as fast as the repetition sends them, This MIGHT build up a 'tail' of pending keystrokes to be handled after the physical key was actually released.

In old DOS on PCs this queue/stack was 15 characters 'deep' - I have no idea how deep that it is on Android.

 

  • Thanks 1
Link to post
Share on other sites
19 hours ago, tdm said:

I've never seen or heard of such an issue. 

FYI, I did report this on your issue tracker in April; you marked it as upstream bug.

https://github.com/tdm/android_device_fxtec_pro1/issues/52

I was unsure if netmans keyboard driver (pushed to stock early march) fixed it or not since I've been on lineage (which now results in accent chooser instead of bunch of repeated characters) but sounds like still an issue there too...

Edited by Craig
  • Like 1
  • Thanks 1
Link to post
Share on other sites
3 hours ago, Craig said:

FYI, I did report this on your issue tracker in April; you marked it as upstream bug.

https://github.com/tdm/android_device_fxtec_pro1/issues/52

I was unsure if netmans keyboard driver (pushed to stock early march) fixed it or not since I've been on lineage (which now results in accent chooser instead of bunch of repeated characters) but sounds like still an issue there too...

 

If it is happening to multiple people (sounds like it is) and arbitrary keys (again, sounds like it is) then it's almost surely a software issue.  I'll have to double check, but I believe that userspace (Android) does the key repeat, not the kernel.  This is the reasoning for marking it upstream.  If that is true, then the issue is most likely related to timing under high workload.

 

  • Like 1
Link to post
Share on other sites
7 minutes ago, marmistrz said:

Yes, this happens to various keys and various apps. I have the impression that more often on heavy apps like Fennec F-Droid but not exclusively. Fast poll seems to help so far, but I'll keep on testing.

That does make this sound a lot like a software issue, I haven't been able to reproduce it however.

Link to post
Share on other sites
2 hours ago, marmistrz said:

Yes, this happens to various keys and various apps. I have the impression that more often on heavy apps like Fennec F-Droid but not exclusively. Fast poll seems to help so far, but I'll keep on testing.

As suggested earlier could it be that the number of keys you get match the time you held down the key, so what you are really seeing is unhandled pending keystrokes coming in late?

Link to post
Share on other sites
3 hours ago, tdm said:

If it is happening to multiple people (sounds like it is) and arbitrary keys (again, sounds like it is) then it's almost surely a software issue.  I'll have to double check, but I believe that userspace (Android) does the key repeat, not the kernel.  This is the reasoning for marking it upstream.  If that is true, then the issue is most likely related to timing under high workload.

 

Is it possible to increase the delay before OS triggers longpress action?  Like increase from 300ms to 500ms or higher... perhaps that could avoid the issue, at least in lineage...   when I was stock, usually when I got the repeating letter quick it was about 8 or 9 of the same letter iirc, so however long it it takes do repeat that many letters add it to the delay or something....  I'd be happy to test with an overley high delay (like 1 or 2 seconds) to see if it keeps happening to me, cuz for me its a daily issue.

Link to post
Share on other sites
1 hour ago, Craig said:

 

Is it possible to increase the delay before OS triggers longpress action?  Like increase from 300ms to 500ms or higher... perhaps that could avoid the issue, at least in lineage...   when I was stock, usually when I got the repeating letter quick it was about 8 or 9 of the same letter iirc, so however long it it takes do repeat that many letters add it to the delay or something....  I'd be happy to test with an overley high delay (like 1 or 2 seconds) to see if it keeps happening to me, cuz for me its a daily issue.

 

I've not really dived into the keyboard code in Android, but it seems the answer is yes... I think.  The setting Settings.Secure.LONG_PRESS_TIMEOUT seems to be what controls the initial repeat delay, but I can't seem to make it work here.  So perhaps that's not the proper setting.  You can test it:


 

settings get secure long_press_timeout

settings put secure long_press_timeout <value>

 

... where <value> is an integer representing the timeout in milliseconds.

 

Unfortunately the rest of the timing values related to the keyboard seem to be hard coded.  So they can only be changed by building a custom ROM.

 

PS... I did some poking around the keyboard driver in the kernel and nothing indicates the kernel handles repeat.  I also ran "getevent -l" in an adb session and that verified it.

 

Link to post
Share on other sites
14 minutes ago, tdm said:

settings get secure long_press_timeout settings put secure long_press_timeout <value>

Yeah; I could change the value and confirm it set, but it didn't change behavior.  I set it high but In the same terminal it still started repeating fast on longpress, and in apps that support accents the popup appeared fast, so no effect.   My default before playing with it was 400ms.

Link to post
Share on other sites

I tested fast poll. The setting seems to alleviate the issue, but it's still present, mostly in Fennec F-Droid. (which as really heavy app)

My most important question was not answered: is F(x)tec aware of this issue? Can we expect an upstream fix? This seems to be no new issue and multiple users seem to be affected.

cc @Erik

Link to post
Share on other sites
4 hours ago, marmistrz said:

I tested fast poll. The setting seems to alleviate the issue, but it's still present, mostly in Fennec F-Droid. (which as really heavy app)

My most important question was not answered: is F(x)tec aware of this issue? Can we expect an upstream fix? This seems to be no new issue and multiple users seem to be affected.

cc @Erik

If it is app dependent to a heavy app as you indicate, it is most likely pending repeats tht the app is to slow to process, and thus really an app bug. Opbviously the phone could offer to slow the repetition rate down to a user choosen level, as a workaround for any ill behaving app - but i would certainly not put it on the top of their todo-list if I should prioritise.

Link to post
Share on other sites
22 hours ago, EskeRahn said:

If it is app dependent to a heavy app as you indicate, it is most likely pending repeats tht the app is to slow to process, and thus really an app bug. Opbviously the phone could offer to slow the repetition rate down to a user choosen level, as a workaround for any ill behaving app - but i would certainly not put it on the top of their todo-list if I should prioritise.

I've just seen it in Conversations, which is  a pretty lightweight app, which rules out a problem with a heavy app.

  • Sad 1
Link to post
Share on other sites
49 minutes ago, marmistrz said:

I've just seen it in Conversations, which is  a pretty lightweight app, which rules out a problem with a heavy app.

Yeah, that seems pretty unlikely to be heavy. So most likely a different cause - unless something heavy is running in the background - but that is not very likely, as I guess it would have to be really intense to slow down keyboard reading.

So the next step would be to backup your stuff and do a factory reset, without restoring any of your apps, to see if that fixes it. And if so then do a restore to see if it is still gone or restoring the apps brings back the bug.. If the bug returns, then some app somehow does not work well with the Pro1, and that can be a tedious puzzle to narrow down which one.

 

Link to post
Share on other sites
On 6/30/2020 at 6:15 PM, Craig said:

Yeah; I could change the value and confirm it set, but it didn't change behavior.  I set it high but In the same terminal it still started repeating fast on longpress, and in apps that support accents the popup appeared fast, so no effect.   My default before playing with it was 400ms.

I think I figured out what that setting affects - longpress touchscreen icon in launcher.  I tried to remove an app from launcher screen and couldnt figure out why longpress not bringing up thing to delete it, then remembered i'd set this to 5sec.  Also, it didn't take effect til after reboot.

Edited by Craig
  • Thanks 1
Link to post
Share on other sites
  • 2 weeks later...
38 minutes ago, jevans64 said:

This happens to me occasionally in the stock SMS app when texting. Mine keeps going until I hit another key.

I had a similar problem on stock Android when I had Button Mapper installed.
It slowed down keypresses and I even had repeating keystrokes occassionally.

I don't think the issue is Button Mapper itself but the way it subscribes too much possible keys - anyway, I don't have this issue since I removed it.

Any similar applications may have the same issue I think.

So I suggest to look at your installed apps and try to temporarily remove those which could be related (in handling keystrokes) and you may find the guilty one but generally the OS does not have such a problem...

Edited by VaZso
Link to post
Share on other sites

I don't know much about the architecture of Android, but maybe the process responsible for detecting key repeat/long press (probably some equivalent of X.org) has too low priority and gets deprived of the time quantum?

Edited by marmistrz
Link to post
Share on other sites
  • 1 month later...

There is certainly a hardware issue with my device. After long time of usage I noticed spontaneous key events for keys that I didn't even touch. Looks like the keyboard is short-circuiting.

I'd send it back for warranty, but since people have waited 7 months for the replacement, I'm a little afraid to send it back for warranty until they finish the pre-orders.

Btw. I also have issues with the USB-C port disconnecting while moving the cable slightly and suspicions of hardware issues with the camera sensor (remaining glue or other dirt in the camera unit)

  • Sad 1
Link to post
Share on other sites

Probably doesn't help, but this issue doesn't affect me in stock. 

I sadly switched back during test 21 or 22 for LOS so I didn't have to deal with this issue as well as others. 

I haven't gone back to the official build yet. Will give it a shot sooner, but I figured I'd let y'all know. 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

Terms