Ticket #1358: kp5.patch

File kp5.patch, 1.5 KB (added by myshkin, 8 years ago)

New fix to add KC_BEGIN keycode (per takkaria).

  • lib/pref/pref.prf

    diff --git a/lib/pref/pref.prf b/lib/pref/pref.prf
    index 4db2baf..63bcc69 100644
    a b A:, 
    203203C:0:5 
    204204C:0:{K}5 
    205205C:0:{MK}5 
     206C:0:{K}[Begin] 
     207C:0:{MK}[Begin] 
    206208 
    207209# Hack -- Commit suicide 
    208210A:Q 
    A:, 
    227229C:1:5 
    228230C:1:{K}5 
    229231C:1:{MK}5 
     232C:1:{K}[Begin] 
     233C:1:{MK}[Begin] 
    230234 
    231235# Run 
    232236A:. 
  • src/main-x11.c

    diff --git a/src/main-x11.c b/src/main-x11.c
    index ad4b356..e75ee62 100644
    a b static void react_keypress(XKeyEvent *ev) 
    16971697                case XK_KP_Page_Down: ch = KC_PGDOWN; kp = TRUE; break; 
    16981698                case XK_KP_End: ch = KC_END; kp = TRUE; break; 
    16991699                case XK_KP_Insert: ch = KC_INSERT; kp = TRUE; break; 
     1700                case XK_KP_Begin: ch = KC_BEGIN; kp = TRUE; break; 
    17001701 
    17011702                case XK_F1: ch = KC_F1; break; 
    17021703                case XK_F2: ch = KC_F2; break; 
  • src/ui-event.c

    diff --git a/src/ui-event.c b/src/ui-event.c
    index 1d6e01e..c9e9601 100644
    a b static const struct { 
    5757        { KC_PGDOWN, "PageDown" }, 
    5858        { KC_INSERT, "Insert" }, 
    5959        { KC_PAUSE, "Pause" }, 
    60         { KC_BREAK, "Break" } 
     60        { KC_BREAK, "Break" }, 
     61        { KC_BEGIN, "Begin" }, 
    6162}; 
    6263 
    6364 
  • src/ui-event.h

    diff --git a/src/ui-event.h b/src/ui-event.h
    index 766d38e..f9208bd 100644
    a b typedef enum 
    123123#define KC_INSERT     0x97 
    124124#define KC_PAUSE      0x98 
    125125#define KC_BREAK      0x99 
     126#define KC_BEGIN      0x9a 
    126127 
    127128/* we have up until 0x9F before we start edging into displayable Unicode */ 
    128129/* then we could move into private use area 1, 0xE000 onwards */