<div dir="ltr">Hi Shlomo!<br><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 14, 2016 at 1:06 AM, Shlomo Solomon <span dir="ltr"><<a href="mailto:shlomo.solomon@gmail.com" target="_blank">shlomo.solomon@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm having a problem getting text input with pygame.<br>
Here's a simple program and the results I'm getting. Digits and special<br>
keys work but I'm getting strange results for alphabet keys.<br>
Any idea what my problem is?<br>
<br>
<br>
import pygame<br>
pygame.init()<br>
pygame.display.set_mode((100, 100))<br>
while True:<br>
for event in pygame.event.get():<br>
if event.type == pygame.KEYDOWN:<br>
print event.key, "-", <a href="http://pygame.key.name" rel="noreferrer" target="_blank">pygame.key.name</a>(event.key)<br>
<br>
<br>
When I hit 1, 2, F1, F2, LeftShift, PageDown, a, b the output is:<br>
<br>
49 - 1<br>
50 - 2<br>
282 - f1<br>
283 - f2<br>
304 - left shift<br>
281 - page down<br>
249 - world 89<br>
240 - world 80<br>
<span class=""><font color="#888888"><br></font></span></blockquote><div><br></div><div>This is working fine for me on Mageia x86-64 v6 on Plasma 5 with this locale:<br><br>shlomif@telaviv1:~$ locale <br>LANG=en_GB.UTF-8 <br>LC_CTYPE=en_US.UTF-8 <br>LC_NUMERIC=en_GB.UTF-8 <br>LC_TIME=en_GB.UTF-8 <br>LC_COLLATE=en_US.UTF-8 <br>LC_MONETARY=en_US.UTF-8 <br>LC_MESSAGES=en_US.UTF-8 <br>LC_PAPER=en_US.UTF-8 <br>LC_NAME=en_GB.UTF-8<br>LC_ADDRESS=en_US.UTF-8<br>LC_TELEPHONE=en_US.UTF-8<br>LC_MEASUREMENT=en_GB.UTF-8<br>LC_IDENTIFICATION=en_GB.UTF-8<br>LC_ALL=<br>shlomif@telaviv1:~$ <br><br></div><div>Regards,<br><br></div><div>-- Shlomi<br clear="all"></div></div><br>-- <br><div class="gmail_signature"><div dir="ltr">------------------------------------------<br>Shlomi Fish <a href="http://www.shlomifish.org/" target="_blank">http://www.shlomifish.org/</a><br><br>Chuck Norris helps the gods that help themselves.<br><br>Please reply to list if it's a mailing list post - <a href="http://shlom.in/reply" target="_blank">http://shlom.in/reply</a> .<br></div></div>
</div></div>