Jump to content

Rotary encoder menu system - input recommendation?


emeb

Recommended Posts

I've got an existing menu system that's based on a rotary encoder with pushbutton where the rotary action scrolls through menu items and the button selects them for entering submenus or editing parameters. Since it's all custom coded and requires a lot of duplicated effort (separate handlers for every menu page) I'd like to consider a more modern approach with event queues, widgets, etc. and I've been looking at using GWIN + GINPUT.

Searching through the support forum it seems that the recommended path is to have the encoder + button generate GINPUT toggle events for clockwise, counterclockwise and press actions. I've studied some of the low-level details of the toggle handling system and I have concerns about responsiveness - in particular the polling interval is set to 200ms and only allows one event per "bit" per polling period. This seems to me like it would result in lost events if the user spins the encoder quickly. I suppose it would be possible to reduce the polling interval or build some queuing into my low level driver, but it's starting to seem rather kludgy.

Is there an alternative approach that might be better suited for the fast responsiveness I need? I saw another user discussing generating keyboard events - would that be quicker?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...