Empty the RC buffer ?

Alles rund um das grafische Benutzerinterface Enigma
PentVaer
Neugieriger
Neugieriger
Beiträge: 14
Registriert: Montag 8. März 2004, 08:50

Empty the RC buffer ?

Beitrag von PentVaer »

I'm writing a plugin for enigma/dreambox.

Can anytone tell me how can I clear the remote control buffer
(I guess at the execBegin event ?) so that I don't get an 'OK' key event leftover from the plugin selection menu ? I'm getting keypresses
by reading from the keyEvents in eventHandler. My current
(unsatisfactory) solution to the problem is to ignore all events within 2 seconds of the plugin starting :-)

Thanks,

Pent

p.s. the plugin is not of the 'needrc' variety
p.p.s. I'm an enigma newbie, sorry if this is a dumb question :-)
tmbinc
Developer
Beiträge: 821
Registriert: Freitag 20. Juli 2001, 00:00

Beitrag von tmbinc »

Most probably you're getting the "up" keys, is this possible?

If you really need to process "up" keypresses, you have to ignore all until you get the first "down" keypress.

However, in most of the cases, you don't even need to process keypresses at all since widgets like the button etc. do this on their own. Unless you are implementing a new control structure, or a new widget, you shouldn't need to read them. Normally you would use actions for this, but in plugins, you can't do this yet, since the you have to map them in the xml files. this is something i want to change, but right know i don't really know how. Skins have the same problem.
PentVaer
Neugieriger
Neugieriger
Beiträge: 14
Registriert: Montag 8. März 2004, 08:50

Beitrag von PentVaer »

Thanks for your quick response, I appreciate it.

After reading your answer, it occurs to me that maybe I'm getting
repeat events. I'll try ignoring them for 'OK' this evening. I'm
ignoring all 'break' (=up) events.

Pent
PentVaer
Neugieriger
Neugieriger
Beiträge: 14
Registriert: Montag 8. März 2004, 08:50

Beitrag von PentVaer »

Yep it was repeats I wasn't filtering. Thanks again for you help.
Often just explaining a problem to someone else takes you to
the answer :-)

Pent