[Bug 2400] New: Issue with Delete when NumLock active

Wine Bugs wine-bugs at winehq.org
Sun Aug 1 07:28:18 CDT 2004


           Summary: Issue with Delete when NumLock active
           Product: Wine
           Version: 20040716
          Platform: PC
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: wine-x11driver
        AssignedTo: wine-bugs at winehq.org
        ReportedBy: biro_arpad at yahoo.com

Found a possible bug in Wine20040716 on a SUSE 9.1 machine using
standard Hungarian PC keyboard with Hungarian keyboard layout.
The bug shows up both with wine-20040716-SuSELinux91.i586.rpm and
with self-compiled Wine20040716.
The problem is that when NumLock is active, both Del keys perform
a "delete" action _and_ insert a comma (the decimal character in
Hungarian). This means that the character just right to the text
cursor is replaced with a comma when pressing any of the two Del
What Wine should do instead: the left Del key should perform a
"delete" and the right one should insert a decimal character
(when NumLock is active).

I did some googling and found this:

Since that patch did not work for me (it may have been good for
that version though), I made another one:

--- keyboard.c.orig     2004-07-28 14:28:20.000000000 +0200
+++ keyboard.c  2004-08-01 13:55:52.608263568 +0200
@@ -945,11 +945,14 @@
         XLookupString(e, NULL, 0, &keysym, NULL);

-    if ((keysym >= 0xFFAE) && (keysym <= 0xFFB9) && (keysym != 0xFFAF)
-       && (e->state & NumLockMask))
+    if (e->state & NumLockMask)     // NumLock is active
+    {if (keysym == 0xFFAC)          // Numeric Del pressed
+        return keyc2vkey[0x3B];     // comma
+     if ((keysym >= 0xFFAE) && (keysym <= 0xFFB9) && (keysym != 0xFFAF))
         /* Only the Keypad keys 0-9 and . send different keysyms
          * depending on the NumLock state */
         return nonchar_key_vkey[keysym & 0xFF];
+    }

     TRACE_(key)("e->keycode = %x\n", e->keycode);

I have no idea as to whether or not this works with other keyboards.
It should definitely be modified somehow, since it has the "comma"
decimal character hard-wired.
Also, the patch may not be optimal at all, so this is really just
for demonstration (it works perfectly here, though).

As a side note: I also tried the following patch, but it does not
work (the left Del is OK (performs a "delete"), but the right one
does nothing):

-    if ((keysym >= 0xFFAE) && (keysym <= 0xFFB9) && (keysym != 0xFFAF)
+    if ((keysym >= 0xFFAC) && (keysym <= 0xFFB9) && (keysym != 0xFFAF) &&
(keysym != 0xFFAD)

Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the wine-bugs mailing list