Skip to content

Conversation

@mean-ui-thread
Copy link
Contributor

From yesterday's PR #273, I realized that there were still couple of issues:

  • the accumulated up/down/left right with a value of 1 would get stuck and never reset, leading to an accidental move-then-select issue that PR Resolved T-Deck trackball oversensitity and added Kbd backlight support #273 was supposed to be addressing
  • It significantly penalized fast scrolling, especially when quickly switching direction (from left immediately to right, or up vs down, etc)

So I took a different approach, ensuring that

  1. We still require 2 ticks of any direction to count toward the movement treshold
  2. Swiching direction no longer requires up to 3 ticks when quickly switching directions
  3. fast scroll remains quick
  4. no movements for 250ms resets the accumulated trackball directions back to zero.

Essentially, it's almost turning the trackball into a joystick, where +1/-1 is essecially a dead-zone, and +2/-2 is accepted, and no movement after 250ms resets the joystick back to the center at 0,0.

Tested locally on my two T-Deck Plus.

@mean-ui-thread mean-ui-thread force-pushed the mean-ui-thread/t-deck_trackball_responsiveness branch from 747e257 to ac57759 Compare February 8, 2026 20:38
#define L_BTN 2
#define R_BTN 1
#define L_BTN 1
#define R_BTN 2
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that left was positive and right was negative before. Still wondering why left and right were inverted here...

I even checked in LilyGo's T-Deck example code, and left is 1, right is 2:

https://github.com/Xinyuan-LilyGO/T-Deck/blob/651631d789b7aca4378333ece196409078b3f053/examples/LvglArduinoVNC_VGA/TDECK_PINS.h#L31-L32

If you perfer keeping left and right inverted, please let me know. I just changed this to make it more intuitive but it's not a big deal if you prefer left as positive on X

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant