Details

Here is a /firmware/target/coldfire/iaudio/x5/button-x5.c containing my button filter I made for my X5.
It consists in storing button data in an array (each new value erase the older one). The average of the values is validated if the difference between the lower and the higher values is not too big.
I think it can be ported to any Jukebox and the filter strength can be configurable.

Well, the joystick of X5 players is not stable. When you push it in one direction, the "keycode" that hardware returns may be varying that much that Rockbox can understand another direction. Then the solution is to make a filter to reduce bounce.

The patch as still a problem : what to return when keypress in not validated by filter ? Nothing or the last valid keypress ? Both in fact depending of the context. I have to watch for it.