Accept emacs-style editing keys for traversal and ESC as an abort character.

This commit is contained in:
Jordan K. Hubbard 1997-01-15 02:52:00 +00:00
parent 75c6403334
commit 91188fac62
8 changed files with 24 additions and 0 deletions

View File

@ -209,12 +209,14 @@ diskPartition(Device *dev, Disk *d)
msg = NULL;
break;
case '\020': /* ^P */
case KEY_UP:
case '-':
if (current_chunk != 0)
--current_chunk;
break;
case '\016': /* ^N */
case KEY_DOWN:
case '+':
case '\r':
@ -413,6 +415,7 @@ diskPartition(Device *dev, Disk *d)
clear();
break;
case '\033': /* ESC */
case 'Q':
chunking = FALSE;
/* Don't trash the MBR if the first (and therefore only) chunk is marked for a truly dedicated

View File

@ -523,6 +523,7 @@ diskLabel(char *str)
clear_wins();
break;
case '\020': /* ^P */
case KEY_UP:
case '-':
if (here != 0)
@ -532,6 +533,7 @@ diskLabel(char *str)
++here;
break;
case '\016': /* ^N */
case KEY_DOWN:
case '+':
case '\r':
@ -917,6 +919,7 @@ diskLabel(char *str)
msg = "A most prudent choice!";
break;
case '\033': /* ESC */
case 'Q':
labeling = FALSE;
break;

View File

@ -247,6 +247,7 @@ optionsEditor(dialogMenuItem *self)
clear();
break;
case '\020': /* ^P */
case KEY_UP:
if (currOpt)
--currOpt;
@ -254,6 +255,7 @@ optionsEditor(dialogMenuItem *self)
for (currOpt = 0; Options[currOpt + 1].name; currOpt++);
continue;
case '\016': /* ^N */
case KEY_DOWN:
if (Options[currOpt + 1].name)
++currOpt;
@ -275,6 +277,7 @@ optionsEditor(dialogMenuItem *self)
clear();
continue;
case '\033': /* ESC */
case 'Q':
clear();
dialog_clear();

View File

@ -209,12 +209,14 @@ diskPartition(Device *dev, Disk *d)
msg = NULL;
break;
case '\020': /* ^P */
case KEY_UP:
case '-':
if (current_chunk != 0)
--current_chunk;
break;
case '\016': /* ^N */
case KEY_DOWN:
case '+':
case '\r':
@ -413,6 +415,7 @@ diskPartition(Device *dev, Disk *d)
clear();
break;
case '\033': /* ESC */
case 'Q':
chunking = FALSE;
/* Don't trash the MBR if the first (and therefore only) chunk is marked for a truly dedicated

View File

@ -523,6 +523,7 @@ diskLabel(char *str)
clear_wins();
break;
case '\020': /* ^P */
case KEY_UP:
case '-':
if (here != 0)
@ -532,6 +533,7 @@ diskLabel(char *str)
++here;
break;
case '\016': /* ^N */
case KEY_DOWN:
case '+':
case '\r':
@ -917,6 +919,7 @@ diskLabel(char *str)
msg = "A most prudent choice!";
break;
case '\033': /* ESC */
case 'Q':
labeling = FALSE;
break;

View File

@ -209,12 +209,14 @@ diskPartition(Device *dev, Disk *d)
msg = NULL;
break;
case '\020': /* ^P */
case KEY_UP:
case '-':
if (current_chunk != 0)
--current_chunk;
break;
case '\016': /* ^N */
case KEY_DOWN:
case '+':
case '\r':
@ -413,6 +415,7 @@ diskPartition(Device *dev, Disk *d)
clear();
break;
case '\033': /* ESC */
case 'Q':
chunking = FALSE;
/* Don't trash the MBR if the first (and therefore only) chunk is marked for a truly dedicated

View File

@ -523,6 +523,7 @@ diskLabel(char *str)
clear_wins();
break;
case '\020': /* ^P */
case KEY_UP:
case '-':
if (here != 0)
@ -532,6 +533,7 @@ diskLabel(char *str)
++here;
break;
case '\016': /* ^N */
case KEY_DOWN:
case '+':
case '\r':
@ -917,6 +919,7 @@ diskLabel(char *str)
msg = "A most prudent choice!";
break;
case '\033': /* ESC */
case 'Q':
labeling = FALSE;
break;

View File

@ -247,6 +247,7 @@ optionsEditor(dialogMenuItem *self)
clear();
break;
case '\020': /* ^P */
case KEY_UP:
if (currOpt)
--currOpt;
@ -254,6 +255,7 @@ optionsEditor(dialogMenuItem *self)
for (currOpt = 0; Options[currOpt + 1].name; currOpt++);
continue;
case '\016': /* ^N */
case KEY_DOWN:
if (Options[currOpt + 1].name)
++currOpt;
@ -275,6 +277,7 @@ optionsEditor(dialogMenuItem *self)
clear();
continue;
case '\033': /* ESC */
case 'Q':
clear();
dialog_clear();