EventMonitor.st
changeset 2805 9fb350d5fef0
parent 2159 591bf0fa03a9
child 6187 ba3bb76a88ff
equal deleted inserted replaced
2804:0a8cc0649624 2805:9fb350d5fef0
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
    12 
    12 
       
    13 "{ Package: 'stx:libtool' }"
       
    14 
    13 StandardSystemView subclass:#EventMonitor
    15 StandardSystemView subclass:#EventMonitor
    14 	instanceVariableNames:''
    16 	instanceVariableNames:''
    15 	classVariableNames:''
    17 	classVariableNames:''
    16 	poolDictionaries:''
    18 	poolDictionaries:''
    17 	category:'Monitors-ST/X'
    19 	category:'Monitors-ST/X'
   126 
   128 
   127     "Modified: / 19.5.1999 / 09:42:59 / cg"
   129     "Modified: / 19.5.1999 / 09:42:59 / cg"
   128 !
   130 !
   129 
   131 
   130 keyPress:key x:x y:y
   132 keyPress:key x:x y:y
   131     |untranslatedKey|
   133     |s untranslatedKey|
   132 
   134 
   133     'KeyPress x:' print. x print. ' y:' print. y print.
   135     s := 'KeyPress x:' , x printString , ' y:' , y printString.
       
   136     s print.
       
   137     Transcript show:s.
   134     (key isMemberOf:Character) ifTrue:[
   138     (key isMemberOf:Character) ifTrue:[
   135         ' character key:' print. key print.
   139         s := ' character key:' , key printString
   136         ' (' print. key asciiValue print. ')' print
   140              , ' (' , key asciiValue printString , ')'.
   137     ] ifFalse:[
   141     ] ifFalse:[
   138         ' symbolic key:' print. key storeString print.
   142         s := ' symbolic key:' , key storeString.
   139         untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
   143         untranslatedKey := device keyboardMap keyAtValue:key ifAbsent:key.
   140         untranslatedKey ~~ key ifTrue:[
   144         untranslatedKey ~~ key ifTrue:[
   141             ' untranslated key:' print. untranslatedKey print
   145             s := s , ' untranslated key:' , untranslatedKey printString
   142         ]
   146         ].
   143     ].
   147     ].
   144 
   148     s printCR.
   145     '' printCR
   149     Transcript showCR:s.
   146 !
   150 !
   147 
   151 
   148 keyRelease:key x:x y:y
   152 keyRelease:key x:x y:y
   149     |untranslatedKey|
   153     |untranslatedKey|
   150 
   154 
   221 ! !
   225 ! !
   222 
   226 
   223 !EventMonitor class methodsFor:'documentation'!
   227 !EventMonitor class methodsFor:'documentation'!
   224 
   228 
   225 version
   229 version
   226     ^ '$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.19 1999-05-19 08:47:51 cg Exp $'
   230     ^ '$Header: /cvs/stx/stx/libtool/EventMonitor.st,v 1.20 2000-09-29 12:45:13 cg Exp $'
   227 ! !
   231 ! !