We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4874 - Lack of unicode support breaks keyboard input in some applications.
Summary: Lack of unicode support breaks keyboard input in some applications.
Status: NEW
Alias: None
Product: sdl12-compat
Classification: Unclassified
Component: everything (show other bugs)
Version: unspecified
Hardware: x86_64 Linux
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-11-24 01:51 UTC by Lyle
Modified: 2019-11-24 01:51 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lyle 2019-11-24 01:51:19 UTC
Some applications, such as the game Frozen Synapse and this legacy SDL tutorial from Lazy Foo http://www.lazyfoo.net/SDL_tutorials/lesson23/index.php pull keyboard input through event.key.keysym.unicode. Currently, this is always set to 0, which results in these applications failing to recognize any input. This occurs due to the following line in SDL12_compat.c:

    event12.key.keysym.unicode = 0;  FIXME("unicode");

However, since the unicode character set is a superset of ASCII, we can provide partial functionality here very easily just by passing through the sym value. For example:

    event12.key.keysym.unicode = event12.key.keysym.sym;

I'll admit that I don't know exactly what will happen here if someone does input a character which requires unicode support. However, I have verified that this change restores keyboard input functionality for me for the sign-in screen of the game Frozen Synapse as well as the above linked legacy Lazy Foo tutorial. Until such time that someone is prepared to fully implement the needed bits for unicode, I think this or something very much like it would be a change for the better.