On 21 Jan 2011, at 12:58, Norman Dunbar wrote:

>> 
>> The hit routine is called by PE in many cases. For example the manual says 
>> "If there is no keystroke, or the keystroke is not the selection keystroke 
>> for a loose menu item or an application sub-window, then, if the pointer is 
>> within a sub-window, the hit routine is called, or else the loose menu item 
>> list is searched to find a new current item". F1 causes an event and so will 
>> cause the hit routine to be called.
> I presume this means that the F1 (or TAB) keystrokes are causing a HIT
> when the key is pressed and then another HIT when the event is raised?
> Although I'm not sure which event might be being raised for the TAB key.

I think you have to test at the start of the hit routine ahit0 what key was 
pressed. Any key at all pressed while the pointer is in the application window 
will cause the hit routine to be called. D2 will contain the uppercased 
keystroke with SPACE, ($20), converted to 1 and ENTER ($0A), converted to 2. 
So, if you wanted pressing "M" to do add to the count of hits you should check 
that D2.L = $4D.

So the fact that F1 causes an event is really a red herring in this case.

George
_______________________________________________
QL-Users Mailing List
http://www.q-v-d.demon.co.uk/smsqe.htm

Reply via email to