Commit d9e35c0f authored by deuce's avatar deuce
Browse files

Use 0xe0 instead of oxff as enhanced key return from getch()

Add support for CIO_KEY_ABORT which always does the same thing as ESC.
parent 6f84fb87
......@@ -140,7 +140,7 @@ int inkey(void)
int c;
c=getch();
if(!c || c==0xff)
if(!c || c==0xe0)
c|=(getch()<<8);
return(c);
}
......@@ -314,7 +314,7 @@ void docopy(void)
gettext(1,1,api->scrn_width,api->scrn_len+1,screen);
while(1) {
key=getch();
if(key==0 || key==0xff)
if(key==0 || key==0xe0)
key|=getch()<<8;
switch(key) {
case CIO_KEY_MOUSE:
......@@ -1098,6 +1098,9 @@ int ulist(int mode, int left, int top, int width, int *cur, int *bar
if(!(api->mode&UIFC_NOCTRL))
gotkey=CIO_KEY_F(6); /* paste */
break;
case CIO_KEY_ABORT:
gotkey=ESC;
break;
}
if(gotkey>255) {
s=0;
......@@ -2081,6 +2084,7 @@ int ugetstr(int left, int top, int width, char *outstr, int max, long mode, int
j--;
}
continue;
case CIO_KEY_ABORT:
case CTRL_C:
case ESC:
{
......
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