psychopy/psychopy — pull request #175 by smathot (2012-07-08 17:40:41+00:00)
Title: Support for non-ASCII keyboard input

Hi Jon,

This patch should, at least as a proof of concept, make it possible to properly capture non-ASCII character input. For example, on my testing Ubuntu 12.04 machine, γρεεκ text input is not dealt with properly.

The fix appears to be to use the Pyglet on_key_press event to capture most keyboard responses, but fall back to on_text when Pyglet decides to represent the key as a 'user_key()' string, rather than an actual character.

Does this make sense? Disclaimer: I just whipped it together and haven't tested this patch extensively.

Cheers,
Sebastiaan