mirror of
https://git.zap.org.au/git/trader.git
synced 2024-12-04 14:46:45 -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) {
|
if (key == ERR) {
|
||||||
// Do nothing on ERR
|
// Do nothing on ERR
|
||||||
;
|
;
|
||||||
} else if ((key == KEY_DEFAULTVAL) && (defaultval != NULL)
|
} else if ((key == KEY_DEFAULTVAL1 || key == KEY_DEFAULTVAL2)
|
||||||
&& (len == 0)) {
|
&& defaultval != NULL && len == 0) {
|
||||||
// Initialise buffer with the default value
|
// Initialise buffer with the default value
|
||||||
|
|
||||||
strncpy(buf, defaultval, bufsize - 1);
|
strncpy(buf, defaultval, bufsize - 1);
|
||||||
|
@ -79,8 +79,9 @@ typedef enum curs_type {
|
|||||||
|
|
||||||
#define KEY_ILLEGAL 077777 // No key should ever return this!
|
#define KEY_ILLEGAL 077777 // No key should ever return this!
|
||||||
|
|
||||||
// Keycode for inserting the default value in input routines
|
// Keycodes for inserting the default value in input routines
|
||||||
#define KEY_DEFAULTVAL '='
|
#define KEY_DEFAULTVAL1 '='
|
||||||
|
#define KEY_DEFAULTVAL2 ';'
|
||||||
|
|
||||||
// Control-arrow key combinations, as returned by NCurses
|
// Control-arrow key combinations, as returned by NCurses
|
||||||
#ifndef KEY_CDOWN
|
#ifndef KEY_CDOWN
|
||||||
|
Loading…
Reference in New Issue
Block a user