1
General / Key code problem
« on: March 18, 2008, 01:06:02 pm »
I encounter something strange:
This display 51 each time I press a key indepently of the real code.
Could it come from my compilation or system as I use a 64 bits Fedora?
Code: [Select]
from PySFML import *
if __name__ == "__main__":
global window
window = sf.RenderWindow(sf.VideoMode(800, 600, 32), "SFML Window")
global running
running = True
while running == True:
evt = sf.Event()
while window.GetEvent(evt):
if evt.Type == sf.Event.Closed:
running = False
if evt.Type == sf.Event.KeyPressed:
print evt.Key.Code
window.Display()
This display 51 each time I press a key indepently of the real code.
Could it come from my compilation or system as I use a 64 bits Fedora?