mirror of
https://git.zap.org.au/git/trader.git
synced 2024-11-03 17:27:29 -05:00
Allow a second default key, ";" as well as "=", to help touch-typists!
This commit is contained in:
parent
ee992fa02a
commit
1408a2ab3d
@ -552,8 +552,8 @@ int gettxline (WINDOW *win, char *buf, int bufsize, bool multifield,
|
||||
if (key == ERR) {
|
||||
// Do nothing on ERR
|
||||
;
|
||||
} else if ((key == KEY_DEFAULTVAL) && (defaultval != NULL)
|
||||
&& (len == 0)) {
|
||||
} else if ((key == KEY_DEFAULTVAL1 || key == KEY_DEFAULTVAL2)
|
||||
&& defaultval != NULL && len == 0) {
|
||||
// Initialise buffer with the default value
|
||||
|
||||
strncpy(buf, defaultval, bufsize - 1);
|
||||
|
@ -79,8 +79,9 @@ typedef enum curs_type {
|
||||
|
||||
#define KEY_ILLEGAL 077777 // No key should ever return this!
|
||||
|
||||
// Keycode for inserting the default value in input routines
|
||||
#define KEY_DEFAULTVAL '='
|
||||
// Keycodes for inserting the default value in input routines
|
||||
#define KEY_DEFAULTVAL1 '='
|
||||
#define KEY_DEFAULTVAL2 ';'
|
||||
|
||||
// Control-arrow key combinations, as returned by NCurses
|
||||
#ifndef KEY_CDOWN
|
||||
|
Loading…
Reference in New Issue
Block a user