Re: [cc65] Question on 1351 mouse

From: Ullrich von Bassewitz <>
Date: 2010-02-03 09:20:17
Good morning!

On Wed, Feb 03, 2010 at 08:14:41AM +0100, Oliver Schmidt wrote:
> Maybe I don't understand this proposal correctly but it seems to me
> that it will cause loosing keyborad strokes.

Yes, you will. But isn't it better to clear the keyboard buffer every time, a
mouse button is clicked instead of getting phantom chars? Most users don't
click the mouse and type at the same time, so this may not be as bad as it
sounds in the first place.

> When the user interacts
> with the program it can't know when the user uses the keyboard and
> when he uses the mouse. So I don't see "one thing after the other".
> Below are some parts from the relevant code. Where could a keyboard
> buffer clearing be inserted?

I think this should go into some lower level function. But for a first test, I
would clear the keyboard buffer in your code when any mouse button is pressed,
or when it just has been released. In all other cases, leave the keaboard
buffer alone. Most users don't type keys and press mouse buttons at the same
time. If this improves the situation, we can still think of something better.
If it does not, we will have to do that, too :-)

BTW: For a joystick mouse, the situation is even worse, since even mouse
movements cause phantom characters.



Ullrich von Bassewitz                        
To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Wed Feb 3 09:20:51 2010

This archive was generated by hypermail 2.1.8 : 2010-02-03 09:20:53 CET