Hi, I got bug in pygame
If I change window resolution in keyboard handler then I got strange KEYUP event:
<Event(2-KeyDown {'scancode': 114, 'key': 275, 'unicode': u'', 'mod': 0})> (K_RIGHT)
<Event(3-KeyUp {'scancode': 0, 'key': 275, 'mod': 0})> (K_RIGHT) # HERE
<Event(3-KeyUp {'scancode': 114, 'key': 275, 'mod': 0})> (K_RIGHT)
but if I hit key very quickly, then I got that:
<Event(2-KeyDown {'scancode': 114, 'key': 275, 'unicode': u'', 'mod': 0})> (K_RIGHT)
<Event(3-KeyUp {'scancode': 0, 'key': 275, 'mod': 0})> (K_RIGHT)
And sometimes pygame stops to receive any keyboard events, but mouse and all other is ok (ALT + F4 still works)
To check bug try to press "a", "s", "d", "right" at the same time few times, after few tries pygame stops to receive any keyboard events.
My system:
$ uname -a
Linux debian 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3 x86_64 GNU/Linux
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 7 (wheezy)"
NAME="Debian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support/"
BUG_REPORT_URL="http://bugs.debian.org/"
$ python
Python 2.7.3 (default, Mar 13 2014, 11:03:55)
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> ÂÂimport sys, pygame
>>> ÂÂsys.version
'2.7.3 (default, Mar 13 2014, 11:03:55) \n[GCC 4.7.2]'
>>> ÂÂpygame.ver
'1.9.1release'