Subject: None
To: None <amiga-dev@sun-lamp.cs.berkeley.edu>
From: None <songcc@VNET.IBM.COM>
List: amiga-dev
Date: 06/09/1994 18:23:17
I found a bug in ite.c file where it handles keypad keys.  The following is the
changes that I made to make it work.  I also changed the second charater sent
out to be 'O' (uppercase 'o') instead of '0' (zero) because emacs doesn't like
it.

Song.

*** ite.c       Thu Jun  9 18:02:25 1994
--- ite.c.save  Thu Jun  9 17:48:18 1994
***************
*** 856,878 ****
                        code &= 0x1f;
                if (key_mod & KBD_MOD_META)
                        code |= 0x80;
        } else if ((key.mode & KBD_MODE_KPAD) &&
            (kbd_ite && kbd_ite->keypad_appmode)) {
! /*            static char  *in = "()*+,-./0123456789"; */
!               static char *out = "PQSl mnRpqrstuvwxy";

                /*
                 * keypad-appmode sends SS3 followed by the above
                 * translated character
                 */
                (*linesw[kbd_tty->t_line].l_rint) (27, kbd_tty);
!               (*linesw[kbd_tty->t_line].l_rint) ('O', kbd_tty);
!               if (code == '\r')
!                       (*linesw[kbd_tty->t_line].l_rint) ('M', kbd_tty);
!               else
!                       (*linesw[kbd_tty->t_line].l_rint) (out[code - '('], kbd_
tty);
                splx(s);
                return;
        } else {
                /* *NO* I don't like this.... */
                static u_char app_cursor[] =
--- 856,876 ----
                        code &= 0x1f;
                if (key_mod & KBD_MOD_META)
                        code |= 0x80;
        } else if ((key.mode & KBD_MODE_KPAD) &&
            (kbd_ite && kbd_ite->keypad_appmode)) {
!               static char *in = "0123456789-+.\r()/*";
!               static char *out = "pqrstuvwxymlnMPQRS";
!               char *cp;

                /*
                 * keypad-appmode sends SS3 followed by the above
                 * translated character
                 */
                (*linesw[kbd_tty->t_line].l_rint) (27, kbd_tty);
!               (*linesw[kbd_tty->t_line].l_rint) ('0', kbd_tty);
!               (*linesw[kbd_tty->t_line].l_rint) (out[cp - in], kbd_tty);
                splx(s);
                return;
        } else {
                /* *NO* I don't like this.... */
                static u_char app_cursor[] =

------------------------------------------------------------------------------