View Full Version : how to flush keyboard buffer (/remove all queued events) ?
AlCapone
April 10th, 2004, 08:00 AM
imagine this:
press & hold a button to quickly increase audio (sending IR to amp.)
(then, windows' autorepeat kicks in, and teh buffer get filled with xx keypresses in no time)
now it's impossible to release the button & stop the volume from increasing...
this can be solved by removing all queued "events" after processing each send.
how to ?
(imagine that anti-repeat cannot be used for this... (because the problem is really a bit more complicated. ... and it does not work..))
AlCapone
April 11th, 2004, 11:50 AM
ok - so I am bumping this... Is there really no way do do it ?
imagine this:
the button used for "mute/pause" is also used as "select" in menu mode...
when I exit "menu" (by selecting something) , then a few codes are sent because of button boucing...
menu is ended, "music control group" enebled, and "menu control group" disabled .
now , the remaining events (same button) are sent stright to "pause" command.... hurray ! :)
plain debouncing does not work on more than one command's event ---
(not that it needs to, but there must be a way to kill remaining events ?)
- yes, I could make a timed "dummy" command that were active for 0.5 seconds, but that's just too messy solution...
Promixis
April 11th, 2004, 12:35 PM
There is no way to clear the keyboard buffer...
I haven't tried this but I imagine you might be able to find a work around for this problem use the luaevents plugin.
You would add an eventhandler which would capture all keyboard events. This eventhandler would call the event (TriggerEvent) to send the IR. The IR send would include a command to set the time (GetClock) the IR was sent. The keyboard handler would then check this time and throw out any events that occured with the last several hundred millisecs..
Something like that ;)
AlCapone
April 11th, 2004, 01:19 PM
I think I have a better plan - without additional plugin.
but thank you for confirming this issue.
AlCapone
April 28th, 2004, 12:46 AM
Yup, I got it working, using clock ticks and processing only if >xxxx ticks.
Anyway- I would loke to request a buffer-clear command...
Promixis
April 28th, 2004, 06:18 AM
Would you post your solution please?
AlCapone
April 29th, 2004, 12:40 PM
will do next time the car is on WLAN, - when I do other work on it.
AlCapone
June 5th, 2004, 02:49 PM
ok -
when selecting a menu-item and menu is closed, i execute one "reset tick count"
the "pause" multievent , that uses the same button, uses the "get tick count" function, then compares the tick count to a value that represents about 1 second, and if less, then it just does not execute the pause command.
Promixis
June 5th, 2004, 03:54 PM
Thanks, BTW, have a look at BoomSmurfs plugin for reducing Girders memory foot print down to about 500k.
AlCapone
June 6th, 2004, 12:52 PM
Thanks, BTW, have a look at BoomSmurfs plugin for reducing Girders memory foot print down to about 500k.
thank you for this tip.. (quite a shame that aftermarket addons is needed to solve this probelm)
BoomSmurf
June 6th, 2004, 02:57 PM
thank you for this tip.. (quite a shame that aftermarket addons is needed to solve this probelm)
Without going into technical details, blame Microsoft, not Girder :)
AlCapone
June 7th, 2004, 01:40 AM
[quote=Without going into technical details, blame Microsoft, not Girder :)[/quote]
I was referring to the "protection" that added to size in the commercial version. (I removed it myself for , but then I got a test version, and hoped for new version with some fixes (hang-on-load) and so did not remove it on the recent versions.)
- but I do remeber that removing the "protection" helped a lot.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.