Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FUNCky - <b>name:</b> <b>m_trapfeed() - set speed that keys are fed by the mousetrap()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Name:     m_trapfeed() - set speed that keys are fed by the mousetrap()
  Usage:    m_trapfeed(<num>)
  Params:   integer <num> - the number denoting how long to wait till
            feeding the next key when mousetrap is set to cursor movement
            (event 3). The default speed is 1. The lower the value, the
            less time between keys fed. The higher the value, the farther
            the user will have to move the mouse till a key is fed. 1 is
            fairly normal, 4 is starting to become too slow already.
            This value may have different effects on machines of
            different clock speeds. Experimentation may be necessary.

  Returns:  nothing

 ---------------------------------- Example ---------------------------------

                    if (cputype() = 80386)
                            m_trapfeed(3)
                    else
                            m_trapfeed(1)
                    endif
                    mousetrap(3,5,24,19,4)
                    m_trapset()
                    read

  Note:     The mousetrap() function is an interrupt driven procedure.
            When the mouse moves, each mickey generates an interrupt
            to the mousetrap() function. On some machines, especially
            386 machines, the interrupts occur very rapidly causing
            the keys to be stuffed very very rapidly, sometimes beyond
            the control of the user. By setting m_trapfeed() to a slightly
            higher number, you can force the mousetrap() function to
            count the number of times the mousetrap function is entered.
            When the count reaches the feed value, the key is finally
            stuffed and the internal counter is reset. This slows down
            how many keys are stuffed and affords greater control over
            cursor movement. m_trapfeed() does not affect events 0-1-2,
            which are button clicks.

See Also: mousetrap() m_trapsave() m_traprest() m_trapset()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson