diff --git a/src/uifc/uifc.h b/src/uifc/uifc.h index 23d2370b70ddc3fef22061808951ab92acfa95b9..39ea4090e0f24a4e90e05cc97b5904e7ad9ccd22 100644 --- a/src/uifc/uifc.h +++ b/src/uifc/uifc.h @@ -157,8 +157,10 @@ #define UIFC_MONO (1<<2) /* Force monochrome mode */ #define UIFC_COLOR (1<<3) /* Force color mode */ #define UIFC_IBM (1<<4) /* Force use of IBM charset */ - +#define UIFC_NOCTRL (1<<5) /* Don't allow useage of CTRL keys for movement + * etc in menus (Still available in text boxes) */ /* Bits in uifcapi_t.list mode */ + #define WIN_ORG (1<<0) /* Original menu - destroy valid screen area */ #define WIN_SAV (1<<1) /* Save existing text and replace when finished */ #define WIN_ACT (1<<2) /* Menu remains active after a selection */ diff --git a/src/uifc/uifc32.c b/src/uifc/uifc32.c index dc7cb926edea28417efbe895fb805671fe53681c..587488be4786808a0cdbcb01d7b00e4d37b5965d 100644 --- a/src/uifc/uifc32.c +++ b/src/uifc/uifc32.c @@ -832,27 +832,33 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar i=CIO_KEY_DC; /* delete */ break; case CTRL_B: - i=CIO_KEY_HOME; + if(!(api->mode&UIFC_NOCTRL)) + i=CIO_KEY_HOME; break; case CTRL_E: - i=CIO_KEY_END; + if(!(api->mode&UIFC_NOCTRL)) + i=CIO_KEY_END; break; case CTRL_U: - i=CIO_KEY_PPAGE; + if(!(api->mode&UIFC_NOCTRL)) + i=CIO_KEY_PPAGE; break; case CTRL_D: - i=CIO_KEY_NPAGE; + if(!(api->mode&UIFC_NOCTRL)) + i=CIO_KEY_NPAGE; break; case CTRL_Z: - i=CIO_KEY_F(1); /* help */ + if(!(api->mode&UIFC_NOCTRL)) + i=CIO_KEY_F(1); /* help */ break; case CTRL_C: - i=CIO_KEY_F(5); /* copy */ + if(!(api->mode&UIFC_NOCTRL)) + i=CIO_KEY_F(5); /* copy */ break; case CTRL_V: - i=CIO_KEY_F(6); /* paste */ + if(!(api->mode&UIFC_NOCTRL)) + i=CIO_KEY_F(6); /* paste */ break; - } if(i>255) { s=0;