At 5:27 AM -0700 6/3/99, ml user wrote:
>is there a way to speed up repeat buttons? Normaly there is a new
>ctlRepeatEvent every 1/2 sec. can I change this to e.g. 1/4 sec. ?

The repeat rates (initial and repeating) are constants hardcoded into the
control event loop -- there's no easy way to adjust them.

Probably the best way to hack this would be to handle the ctlRepeatEvent
and modify the eventP->data.ctlRepeat.time structure before passing it to
the form or control event handler.

When the control event handler gets a ctlEnterEvent or ctlRepeatEvent on a
repeating button, it tracks the pen and if it's held down in the button for
"long enough", it generates a ctlRepeatEvent and returns.  It relies on
your code processing the ctlRepeatEvent and then calling back into the
control event handler, which will wait some more and then generate the next
event.

By subtracting a little bit from the eventP->data.ctlRepeat.time value in
the ctlRepeatEvent event structure, you sort of pretend that the previous
repeat event happened a little sooner than it really did, so the timeout in
the pen tracking loop fires sooner, and the repeat rate speeds up.

                                --Bob

_______________________________________________________________________
Bob Ebert, Sr. Software Engineer, Palm Computing Inc., 3Com Corporation
V: 408 326-9299  5400 Bayfront Plaza, MS: 10212, Santa Clara, CA, 95052
F: 408 326-9891,  [EMAIL PROTECTED]  (preferred: [EMAIL PROTECTED])


Reply via email to