"
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
'From Smalltalk/X, Version:1.4 on 19-Jul-91 at 18:34:01'!
StandardSystemView subclass:#EventMonitor
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
category:'Interface-Tools'
!
EventMonitor comment:'
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.4 1994-11-21 16:51:30 claus Exp $
'!
!EventMonitor class methodsFor:'documentation'!
copyright
"
COPYRIGHT (c) 1991 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
"
!
version
"
$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.4 1994-11-21 16:51:30 claus Exp $
"
!
documentation
"
like xev - show events.
You can use this to check your keyboard mappings, for example.
start with:
EventMonitor open
and watch the output on xterm.
"
! !
!EventMonitor class methodsFor:'defaults'!
defaultExtent
^ 200 @ 200
!
defaultLabel
^ 'Event Monitor'
! !
!EventMonitor methodsFor:'initialization'!
initialize
super initialize.
Label label:'see event trace\on standard output' withCRs in:self
! !
!EventMonitor methodsFor:'events'!
keyPress:key x:x y:y
'KeyPress x:' print. x print. ' y:' print. y print.
(key isMemberOf:Character) ifTrue:[
' character key:' print. key print.
' (' print. key asciiValue print. ')' print
] ifFalse:[
' symbolic key:' print. key print
].
'' printNL
!
keyRelease:key x:x y:y
'KeyRelease x:' print. x print. ' y:' print. y print.
(key isMemberOf:Character) ifTrue:[
' character key:' print. key print.
' (' print. key asciiValue print. ')' print
] ifFalse:[
' symbolic key:' print. key print
].
'' printNL
!
buttonPress:button x:x y:y
'buttonPress x:' print. x print. ' y:' print. y print.
' button:' print. button printNL
!
buttonRelease:button x:x y:y
'buttonRelease x:' print. x print. ' y:' print. y print.
' button:' print. button printNL
!
buttonMotion:button x:x y:y
'buttonMotion x:' print. x print. ' y:' print. y print.
' button:' print. button printNL
!
pointerEnter:state x:x y:y
'pointerEnter x:' print. x print. ' y:' print. y print.
' state:' print. state printNL
!
pointerLeave:state
'pointerLeave state:' print. state printNL
!
mapped
'mapped' printNL
!
unmapped
'unmapped' printNL
!
visibilityChange:how
'visibilityChange:' print. how printNL
! !
!EventMonitor methodsFor:'realization'!
initEvents
self enableButtonEvents.
self enableMotionEvents.
self enableButtonMotionEvents.
self enableKeyReleaseEvents.
self enableEnterLeaveEvents.
self enableEvent:#visibilityChange
! !