--- gtk+-2.24.33/gdk/x11/gdkevents-x11.c.orig +++ gtk+-2.24.33/gdk/x11/gdkevents-x11.c @@ -1138,8 +1138,31 @@ return_val = FALSE; break; } + + if (xevent->xkey.state == 0) + { + switch (XKeycodeToKeysym (display_x11->xdisplay, xevent->xkey.keycode, 0)) { + case GDK_R7: /* Home key on Sun Type-4/5/6 keyboard */ + xevent->xkey.keycode = XKeysymToKeycode (display_x11->xdisplay, +GDK_Home); + break; + case GDK_R13: /* End key on Sun Type-4/5/6 keyboard */ + xevent->xkey.keycode = XKeysymToKeycode (display_x11->xdisplay, +GDK_End); + break; + case GDK_R9: /* PgUp Key */ + xevent->xkey.keycode = XKeysymToKeycode (display_x11->xdisplay, +GDK_Prior); + break; + case GDK_R15: /* PgDn Key */ + xevent->xkey.keycode = XKeysymToKeycode (display_x11->xdisplay, +GDK_Next); + break; + } + } translate_key_event (display, event, xevent); set_user_time (window, event); + break; case KeyRelease: