tests/curses_mouse.py
changeset 110 cf3d49cdd6e2
parent 20 472a753664f9
--- a/tests/curses_mouse.py	Wed Sep 03 19:08:21 2014 +0200
+++ b/tests/curses_mouse.py	Wed Sep 03 19:13:37 2014 +0200
@@ -1,5 +1,4 @@
-#!/usr/bin/python
-# -*- coding: utf-8 -*-
+#!/usr/bin/python3
 
 import curses
 import locale
@@ -21,8 +20,8 @@
         screen.addstr('key: %x %s\n' % (c, char))
 
         if c == curses.KEY_MOUSE:
-            m = curses.getmouse()
-            screen.addstr('(%d %d %d %d %x)\n' % m)
+            id_, x, y, z, bstate = curses.getmouse()
+            screen.addstr('(%d %d %d %d %s)\n' % (id_, x, y, z, bin(bstate)))
 
         screen.refresh()