diff --git a/pdcurses/getch.c b/pdcurses/getch.c index 65c64106..70fc316b 100644 --- a/pdcurses/getch.c +++ b/pdcurses/getch.c @@ -16,7 +16,7 @@ #define _INBUFSIZ 512 /* size of terminal input buffer */ #define NUNGETCH 256 /* max # chars to ungetch() */ -RCSID("$Id: getch.c,v 1.53 2006/11/12 20:38:00 wmcbrine Exp $"); +RCSID("$Id: getch.c,v 1.54 2006/11/12 20:54:07 wmcbrine Exp $"); static int c_pindex = 0; /* putter index */ static int c_gindex = 1; /* getter index */ @@ -180,7 +180,7 @@ int wgetch(WINDOW *win) /* translate mouse clicks in the slk area to function keys */ - if (key == KEY_MOUSE) + if (key == KEY_MOUSE && SP->key_code) { int fn = PDC_mouse_in_slk(pdc_mouse_status.y, pdc_mouse_status.x); diff --git a/win32/pdckbd.c b/win32/pdckbd.c index 6ddca202..3935e180 100644 --- a/win32/pdckbd.c +++ b/win32/pdckbd.c @@ -13,7 +13,7 @@ #include "pdcwin.h" -RCSID("$Id: pdckbd.c,v 1.75 2006/11/12 20:38:00 wmcbrine Exp $"); +RCSID("$Id: pdckbd.c,v 1.76 2006/11/12 20:54:07 wmcbrine Exp $"); #define ACTUAL_MOUSE_MOVED (actual_mouse_status.changes & 8) #define ACTUAL_BUTTON_STATUS(x) (actual_mouse_status.button[(x) - 1]) @@ -699,6 +699,7 @@ int PDC_get_bios_key(void) the user. Save it in the pdc_mouse_status structure. */ pdc_mouse_status = temp_mouse_status; + SP->key_code = TRUE; return KEY_MOUSE; }