[vdr] [PATCH] ignore k_Repeat in cInterface::Wait()

Marko Mäkelä marko.makela at hut.fi
Mon Aug 29 12:59:29 CEST 2005


On Sun, Aug 28, 2005 at 11:48:25PM +0200, Reinhard Nissl wrote:
> >While testing my suspend patch (see the previous message), I noticed 
> >somewhat
> >annoying behaviour of cInterface::Wait().  If I press the "Suspend" key
> >for a long time, so that it makes a normal keypress event as well as a
> >k_Repeat event, the "Press any key to cancel shutdown" prompt will be
> >cleared by the k_Repeat event.  I presume that the same would happen
> >with the "Power" key.
> 
> That's true. Most of the time, my mom seems to be not able to press the 
> power key short enough to not trigger a k_Repeat event. As a result the 
> VDR in the living room won't be powered off quite often (it's another 
> question whether it is useful to switch of a VDR anyway ;-))

Well, although my machine is quite silent and my house is equipped with
electric heating elements, I prefer to keep my computers shut down most
of the time and use the backup heating system when heating is needed.
About 10 years ago, the power supply of my PC caught fire when there
was a voltage spike on the mains network.  Luckily I was there.  Only
the filter capacitor on the mains input was blown.  So, nvram-wakeup is
my friend.

> Maybe it would be a good idea to change the test in a way that it must 
> be a different key, to abort the action, not the key that triggers the 
> action. E. g. press power to initiate shutdown but back for example to 
> abort it.

I don't think it is necessary, provided that your remote control driver
generates k_Repeat events properly.  (softdevice-dfb didn't until the patch
http://www.funet.fi/~msmakela/software/vdr/index.en.html#dfb-repeat
that I wrote yesterday.)

I tested the patch, and I can use the same key to confirm the message.
Did you try the patch out?  After applying it, you should still be able
to cancel the shutdown by pressing Power two times.  I don't think there
is any reason to require that the message must be confirmed by any other
key.  If you're in a dark room and have your thumb on the key already,
it's much easier to press the same key again.

	Marko



More information about the vdr mailing list