On Wed, Apr 23, 2014 at 10:32:02AM -0400, Charlie Hitselberger wrote: >What I would like to do is use the STOP button as an escape key for >editor commands. Could you modify the editor input loop that is waiting for a keypress? The STOP button should emit the code 3 (ctrl-c) when using jsr $ffe4. If you want to handle the STOP key in the IRQ handler, I believe that you would have to add some kind of counter and a global variable that is shared between the IRQ handler and the event loop. >I would like to flash the screen (EOR #$80, wait 5 jiffies, EOR #$80) >when the user hits STOP. The PET will go into a loop waiting for the >next keystroke and treat it as an editor command. I don't want the >screen to flash 137 times when the user holds down the STOP key, I only >want to notice and react once to each discrete STOP key press and >release event pair. Any ideas? Is the STOP key auto-repeating on the PET? Even if it were, your input loop could skip the screen-flashing if the previously received key code was 3. However, if I were you, I would define STOP+STOP as a "cancel the escape" command. Pressing STOP once would invert the screen (first EOR#$80), and pressing STOP again would invert it back. Also, any valid STOP+x combination would invert the screen back. Marko Message was sent through the cbm-hackers mailing listReceived on 2014-04-24 06:00:08
Archive generated by hypermail 2.2.0.