Commit c36c2003 authored by deuce's avatar deuce
Browse files

Add new UIFC mode flag UIFC_NOCTRL which doesn't use CTRL keys for movement

in menus (Still available in text editing)
parent 46a01292
......@@ -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 */
......
......@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment