View Single Post
Posts: 1,258 | Thanked: 672 times | Joined on Mar 2009
#813
I encounter short-press identified as long-press daily on both n800 and n810 (though more on n800). This affects both the swap button and back button. Doesn't matter what app has focus.

It's probably because some of the keys are hooked up to GPIOs instead of i2c, and have userspace processes monitoring their state. This is total and complete speculation, but the process probably has a loop/wait for gpio state change, then sends an event over dbus or similar. Most of the time is spent in the wait for events loop, so the sending event code can easily be paged out to swap.When you do press the button, it records the time then fires the event, but oops it has to wait for the memory pages to come back from swap, which might take a few seconds in worst case, especially if other pages have to be swapped out first. When it goes back to checking the key state again and notices the key has been released, it checks the time again to see how long it was held, which now seems much longer because the process was stuck waiting on CPU and/or IO.

Plausible theory?
 

The Following User Says Thank You to shadowjk For This Useful Post: