Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows dead key behaviour inconsistent with other platforms #426

Closed
SDLBugzilla opened this issue Feb 10, 2021 · 0 comments
Closed

Windows dead key behaviour inconsistent with other platforms #426

SDLBugzilla opened this issue Feb 10, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: HG 1.2
Reported for operating system, platform: Windows (All), x86

Comments on the original bug report:

On 2008-08-30 12:23:56 +0000, Tim Angus wrote:

As we all know SDL 1.2 doesn't handle dead keys well since one key press potentially equals two (or more) characters. For example, on many layouts, keying , results in ,. Since the unicode member of the SDL_keysym struct only has room for one character, only one can be returned.

On Linux, the first character is returned. On Windows however, unless the exact number of characters generated by the keypress is 1, nothing is returned. The following patch addresses this inconsistency.

On 2008-08-30 12:24:42 +0000, Tim Angus wrote:

Created attachment 268
Patch which makes win32 dead key behaviour consistent with other platforms

Aforementioned patch.

On 2009-04-02 08:33:00 +0000, Tim Angus wrote:

Created attachment 314
Patch which makes win32 dead key behaviour consistent with other platforms and correctly respects the state of numlock key

Updated patch which includes a further fix to the handling of the numpad when numlock is on. This further fix is courtesy Amanieu d'Antras.

On 2009-04-02 09:54:07 +0000, Amanieu d'Antras wrote:

That patch was really only intended for use in ioq3, since it make numpad keys return the same keysym as normal number keys when numlock is on. This was done because ioq3 will still interpret the keysym and therefore cause a HOME while typing a 7 on the numpad. The clean way to do this is to make a separate keysym for numpad keys when numlock is on or off.

On 2009-04-02 10:05:12 +0000, Tim Angus wrote:

OK, lets stick to the original patch then.

On 2009-04-02 10:12:55 +0000, Amanieu d'Antras wrote:

Created attachment 317
Only set the unicode, not the keysym

This patch doesn't override the keysym, and therefore should be appropriate for SDL.

On 2009-04-13 01:42:28 +0000, Sam Lantinga wrote:

This was checked in as revision 4484.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant