From adfaae06772223bf713c57af3a730ae9ec4fd459 Mon Sep 17 00:00:00 2001 From: "nethack.allison" Date: Sun, 23 Mar 2003 19:20:22 +0000 Subject: [PATCH] numkey (from ) mapping the 5 and 0 to '5' and '0' respectively when NumLock is off, to make entering numbers easier. The core will map '5' and '0' to 'g' and 'i' respectively. This solves W341-5. Note: I changed nhdefkey.c and mhmain.c, so both the tty and the windows interface will show new behaviour. I deliberately did not change nh340key.dll. Note: Maybe the same change should be made to the MSDOS port. Note: The behaviour of getobj is a little bit strange: It doesn't use yn_question's facility for returning a number, but handles that itself. The net effect of this is that if you type d55$ (to drop 55 zorkmids,) only the first '5' is shown --- sys/winnt/nhdefkey.c | 4 ++-- win/win32/mhmain.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/winnt/nhdefkey.c b/sys/winnt/nhdefkey.c index eeeeb0f30..5d682b201 100644 --- a/sys/winnt/nhdefkey.c +++ b/sys/winnt/nhdefkey.c @@ -81,13 +81,13 @@ static const struct pad { {'9', M('9'), '9'}, /* 9 */ {'m', C('p'), C('p')}, /* - */ {'4', M('4'), '4'}, /* 4 */ - {'g', 'G', 'g'}, /* 5 */ + {'5', M('5'), '5'}, /* 5 */ {'6', M('6'), '6'}, /* 6 */ {'+', 'P', C('p')}, /* + */ {'1', M('1'), '1'}, /* 1 */ {'2', M('2'), '2'}, /* 2 */ {'3', M('3'), '3'}, /* 3 */ - {'i', 'I', C('i')}, /* Ins */ + {'0', M('0'), '0'}, /* Ins */ {'.', ':', ':'} /* Del */ }; diff --git a/win/win32/mhmain.c b/win/win32/mhmain.c index ccb9811aa..65658dcaf 100644 --- a/win/win32/mhmain.c +++ b/win/win32/mhmain.c @@ -138,13 +138,13 @@ numpad[KEY_LAST][3] = { {'9', M('9'), '9'}, /* 9 */ {'m', C('p'), C('p')}, /* - */ {'4', M('4'), '4'}, /* 4 */ - {'g', 'G', 'g'}, /* 5 */ + {'5', M('5'), '5'}, /* 5 */ {'6', M('6'), '6'}, /* 6 */ {'+', 'P', C('p')}, /* + */ {'1', M('1'), '1'}, /* 1 */ {'2', M('2'), '2'}, /* 2 */ {'3', M('3'), '3'}, /* 3 */ - {'i', 'I', C('i')}, /* Ins */ + {'0', M('0'), '0'}, /* Ins */ {'.', ':', ':'} /* Del */ };