Re: A89: CORRECTION: Shift+ON


[Prev][Next][Index][Thread]

Re: A89: CORRECTION: Shift+ON




On Wed, Aug 16, 2000 at 03:48:43AM -0400, Scott Noveck wrote:
> 
> I downloaded the most recent doors source; apparently, the new version DOES
> use the event handler for Shift+ON (strange, certain "other" documentation
> doesn't appear to indicate you can detect the ON key with events =).

I taught Xavier how to use EV_hook back in fall 1999, I think. I wanted him
to make DoorsOS a bit more compatible with future AMSes (and future
hardware! :) ) and I suggested that he should use the event hook as opposed
to autoint 6.

According to Xavier's tests, the [ON]-key did generate CM_KEYPRESS (although
I called it EV_KEY by then :) ).


> Also, I find it odd that Xavier tests whether the shift key has been pressed
> EVERY SINGLE TIME that CM_IDLE [Zeljko: you guessed that name wrong =] is
> called, rather that just checking when the on button is pressed?  It's
> generating a bit more code and possibly interfering with the calc's "normal"
> operations (at least a little slowdown) for no reason I can determine. . .

Xavier then told me that the status bits (shift, alpha etc) were wrong in
the [ON] key event. My solution to this was to extract the [shift] status
bit from the CM_IDLE events (EV_IDLE!) instead, and use this flag when the
CM_KEYPRESS arrived.


/Johan  "100 bytes is enough."



References: