]> granicus.if.org Git - nethack/commitdiff
numkey (from <Someone>)
authornethack.allison <nethack.allison>
Sun, 23 Mar 2003 19:20:22 +0000 (19:20 +0000)
committernethack.allison <nethack.allison>
Sun, 23 Mar 2003 19:20:22 +0000 (19:20 +0000)
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
win/win32/mhmain.c

index eeeeb0f30ee68adf3a8e43c94c8b0a12577986ec..5d682b2016ebd2a372cf79cd4613d95d22d8235e 100644 (file)
@@ -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 */
 };
 
index ccb9811aa6b7582197ce8a567def35755a48aaa4..65658dcaf6fe2db41c4ed28695eb30f5a3aadf15 100644 (file)
@@ -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 */
 };