gtk cannot differ GDK_KP_Enter and GDK_Return on win32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, All!
I don't know if this is known bug/feature that

gtk cannot differ GDK_KP_Enter and GDK_Return on win32

So, in my program in key-press-event on window
I get GDK_KP_Enter under linux after pressing Enter on keypad
but under windows xp I get GDK_Return.

I have took a look in gtk sources and found in gdkevents-win32.c(line
2144 in 2.18.7 version):

if (HIWORD (msg->lParam) & KF_EXTENDED)
        {
          switch (msg->wParam)
            {
            case VK_CONTROL:
              event->key.hardware_keycode = VK_RCONTROL;
              break;
            case VK_SHIFT:      /* Actually, KF_EXTENDED is not set
                                 * for the right shift key.
                                 */
              event->key.hardware_keycode = VK_RSHIFT;
              break;
            case VK_MENU:
              event->key.hardware_keycode = VK_RMENU;
              break;
            }
        }

maybe something like
case VK_ENTER:
    event->key.keyval = GDK_KP_Enter;
    break;

should be added to fix this behavior?

_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux