emeb Posted October 11, 2018 Report Share Posted October 11, 2018 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 More sharing options...
inmarket Posted October 12, 2018 Report Share Posted October 12, 2018 Have a look at the dial devices. A rotary encoder fits fairly nicely with the dial device. Link to comment Share on other sites More sharing options...
Joel Bodenmann Posted October 14, 2018 Report Share Posted October 14, 2018 And a GINPUT toggle for the pushbutton to select stuff Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now