Re: [cc65] Question on 1351 mouse

From: Greg King <>
Date: 2010-01-31 01:40:37
From: "Oliver Schmidt"; on Sat., Jan. 30, 2010; at 05:43 PM -0500
> So, if I press the left mouse-button, then "as a side effect," the key-
> code 160 is detected by cgetc().  If I, on the other hand, press
> Shift-Space, then "as a side effect," a left mouse-button press is
> detected by the mouse driver.  Is that the expected behaviour?
> Does that mean that a program that allows the user to enter text (thus,
> reacting to "all" keys) needs to filter out the key 160, to avoid
> garbage enterred by mouse-button presses?

One "usual" scheme is that a program "dumps" the keyboard buffer whenever
it sees that a mouse button was pressed.

Some of that cross-talk can be avoided by the mouse driver.  The driver
can change the values in the keyboard matrix's output port and direction
registers during it's reading of the buttons.  I did that in a driver that
I created decades ago for the ROM Kernal's screen editor.  It translated
mouse movement into cursor characters.  The blinking text cursor followed
the mouse's I-beam sprite around the screen.

I keep getting the idea that I should find that old code, and add it to
CC65's drivers.  But, I always forget about it, an hour later. :-(
(Maybe, if I keep your flagged letter in my mailbox, it will "kick" me
enough times that I finally will do what I should have done years ago!)

To unsubscribe from the list send mail to with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Sun Jan 31 02:11:30 2010

This archive was generated by hypermail 2.1.8 : 2010-01-31 02:11:33 CET