[futurebasic] Key Up Event?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1997 : Group Archive : Group : All Groups

From: Martin Fitzgibbons <rush@...>
Date: Sat, 15 Nov 1997 16:06:33 +1100
Why does the following code only respond to the keydown event?


DIM gQuit%
END GLOBALS

LOCAL FN SetEvtMask
  POKE _sysEvtMask, &HFFFF  '<-- poke word to enable key-up events
END FN

LOCAL FN DoMacEvent
  macEvnt% = {EVENT}
  SELECT macEvnt%
    CASE _mButDwnEvt
      gQuit% = _true
    CASE _keyDwnEvt
      keypressed=PEEK(EVENT+_evtMessage+3)
      PRINT keypressed"   pressed!"
    CASE _keyUpEvt
      keypressed=PEEK(EVENT+_evtMessage+3)
      PRINT keypressed"•• Key up!!
    CASE ELSE
  END SELECT
  POKE EVENT, _nullEvt
END FN

WINDOW 1
FN SetEvtMask               '<-- call once at start of program
ON EVENT FN DoMacEvent

DO
  HANDLEEVENTS
UNTIL gQuit%
END
 

Martin Fitzgibbons
Rush Software