Jump to content
Eternal Lands Official Forums
Sign in to follow this  
teranoz

[patch #000227] Numerical Keypad Fix

Recommended Posts

The event.key.keysym.unicode does not work in windows.

To fix that, the patch translates the keynumbers to the corresponding keynumbers from the standard numerical keys.

Share this post


Link to post
Share on other sites

Index: events.c
===================================================================
RCS file: /cvsroot/elc/elc/events.c,v
retrieving revision 1.74
diff -r1.74 events.c
391c391,410
<
---
> #ifdef WINDOWS //Teranoz keypad patch
>                               if ((key>=256 && key<=267) || key==271)
>                                       {
>                                       switch (key)
>                                               {
>                                                       case 266:
>                                                               ch = 46;
>                                                               break;
>                                                       case 267:
>                                                               ch = 47;
>                                                               break;
>                                                       case 271:
>                                                               ch = 13;
>                                                               break;
>                                                       default:
>                                                               ch = key-208;
>                                                               break;
>                                               }
>                                       }
> #endif

If it's working it should be merged. I just don't have a windows machine to do the checking, so I'll let someone else do the dirty work ;-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×