Mercurial > hg > early-roguelike
changeset 97:d4bf99f82ea0
arogue5: fix backspace key.
author | John "Elwin" Edwards |
---|---|
date | Wed, 28 Aug 2013 08:37:56 -0700 |
parents | 9fb343307b6b |
children | ea71ef31d9be |
files | arogue5/mdport.c arogue5/options.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/arogue5/mdport.c Tue Aug 27 22:54:28 2013 -0700 +++ b/arogue5/mdport.c Wed Aug 28 08:37:56 2013 -0700 @@ -1194,6 +1194,9 @@ case ALT_PAD8 : ch = MOD_MOVE('K'); break; case ALT_PAD9 : ch = MOD_MOVE('U'); break; #endif +#ifdef KEY_BACKSPACE + case KEY_BACKSPACE: ch = md_erasechar(); break; +#endif } break;
--- a/arogue5/options.c Tue Aug 27 22:54:28 2013 -0700 +++ b/arogue5/options.c Wed Aug 28 08:37:56 2013 -0700 @@ -223,7 +223,7 @@ * loop reading in the string, and put it in a temporary buffer */ for (sp = buf; - (c = wgetch(win)) != '\n' && + (c = md_readchar(win)) != '\n' && c != '\r' && c != '\033' && c != '\007' &&