[syslinux] Does advanced menu actually support ontimeout?

Murali Krishnan Ganapathy gmurali at cs.uchicago.edu
Sun Nov 6 10:01:19 PST 2005


The complex example only shows a way by which you can avoid displaying 
the menu system when no keys are pressed. What you need is to use the 
"timeout handler". Basically your code gets called if the user has not 
pressed any key for some user specified amount of time. Appropriate 
excerpt from the "MANUAL"

-----------------------------------------

2.3.1 timeout handler
---------------------
This is installed using a call to "reg_ontimeout(fn,numsteps,stepsize)"
function. fn is a pointer to a function which takes no arguments and
returns one of CODE_WAIT, CODE_ENTER, CODE_ESCAPE. This function is
called when numsteps*stepsize Centiseconds have gone by without any
user input. If the function returns CODE_WAIT then the menusystem
waits for user input (for another numsteps*stepsize Centiseconds). If
CODE_ENTER or CODE_ESCAPE is returned, then the system pretends that
the user hit ENTER or ESCAPE on the keyboard and acts accordingly.

-------------------------------

The smaller stepsize is the better the responsiveness of the system. 
Basically the menu system sleeps
for "stepsize" centiseconds before checking if a key has been pressed 
and acts on it. Of course your code
need not return and call an appropriate syslinux command to quit the 
program completely.

Hope this helps.

- Murali

Nazo wrote:
> I've finally gotten around to playing with the advanced menu, though
> the complex example is definitely still beyond me.  I'm trying to
> figure out a few basics from it, such as the tab key for line editing
> (don't know what I've done wrong here since it seems like I copied
> that part right) and the timeout.  It looks to me like the only
> ontimeout implemented so far is an option to not even show the menu at
> all if the user doesn't press a key within a certain time period. 
> But, I want it to show the menu and simply time out after a while of
> no keypresses.  Is there any way to implement this that doesn't
> require several pages of code?  Have I just gotten mixed up and it
> already does this but I copied that code wrong too?
>
> _______________________________________________
> SYSLINUX mailing list
> Submissions to SYSLINUX at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>
>
>   




More information about the Syslinux mailing list