demo_input.py
changeset 73 85a282b5e4fc
parent 62 2f61931520c9
child 76 fa5301e58eca
equal deleted inserted replaced
72:6e0656600754 73:85a282b5e4fc
    19         editbox.add_handler('keypress', self.on_any_input)
    19         editbox.add_handler('keypress', self.on_any_input)
    20         editbox.add_handler('mousedown', self.on_any_input)
    20         editbox.add_handler('mousedown', self.on_any_input)
    21         editbox.add_handler('mouseup', self.on_any_input)
    21         editbox.add_handler('mouseup', self.on_any_input)
    22         editbox.add_handler('mousewheel', self.on_any_input)
    22         editbox.add_handler('mousewheel', self.on_any_input)
    23         editbox.add_handler('mousemove', self.on_any_input)
    23         editbox.add_handler('mousemove', self.on_any_input)
       
    24         editbox.add_handler('mousehover', self.on_any_input)
    24 
    25 
    25     def on_any_input(self, ev):
    26     def on_any_input(self, ev):
    26         if ev.event_name == 'keypress' and ev.char == 'q':
    27         if ev.event_name == 'keypress' and ev.char == 'q':
    27             self.terminate()
    28             self.terminate()
    28         self.text += ''.join((ev.event_name.ljust(10), ' : ', repr(ev), '\n'))
    29         self.text += ''.join((ev.event_name.ljust(10), ' : ', repr(ev), '\n'))