[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] BUG: "/" key won't work with brazilian ABNT 2 keyboard



Aaron Maupin wrote:
Not sure if this is connected, but when I was working on a Pygame project with text input, it didn't detect my Japanese keyboard. It seemed to treat it like a standard U.S. keyboard. For example, if I pressed SHIFT-2, I got an @ instead of the correct ".

I was using Windows and the OS correctly mapped the keyboard, typing in IDLE worked as expected, it was only my Pygame program that seemed to be using a different keymap. Since non-alphanumeric keys weren't that important, I didn't investigate and just hacked around it...



I remember some complexities when dealing with keystrokes back when I was programming native Windows 95 apps. You can use virtual keycodes to trap stuff, but it was sometimes incorrect - there was a translating routine you had to run it through to get the 'real' keycode. Maybe Pygame isn't using MapVirtualKey?

http://msdn2.microsoft.com/en-us/library/ms646306.aspx