summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-03 22:29:53 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2009-02-03 22:29:53 +0000
commit72aae92fdbbe1afa692ebe0bf9dc32e59ae9e368 (patch)
tree25b6ec1a247bf4c4bf201d5c7aa046f48e7082dd /crawl-ref
parent7031bb9bc2dd762f48936f920971eb39a59317ae (diff)
downloadcrawl-ref-72aae92fdbbe1afa692ebe0bf9dc32e59ae9e368.tar.gz
crawl-ref-72aae92fdbbe1afa692ebe0bf9dc32e59ae9e368.zip
Added castamir's patch to fix 2550022. Seems to work.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8885 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/cmd-keys.h9
-rw-r--r--crawl-ref/source/libunix.cc45
2 files changed, 27 insertions, 27 deletions
diff --git a/crawl-ref/source/cmd-keys.h b/crawl-ref/source/cmd-keys.h
index 25c212a392..9932d5cf2b 100644
--- a/crawl-ref/source/cmd-keys.h
+++ b/crawl-ref/source/cmd-keys.h
@@ -14,6 +14,15 @@
{CK_PGDN, CMD_MOVE_DOWN_RIGHT},
{CK_PGUP, CMD_MOVE_UP_RIGHT},
{CK_HOME, CMD_MOVE_UP_LEFT},
+{1001, CMD_MOVE_DOWN_LEFT},
+{1004, CMD_MOVE_LEFT},
+{1002, CMD_MOVE_DOWN},
+{1008, CMD_MOVE_UP},
+{1006, CMD_MOVE_RIGHT},
+{1003, CMD_MOVE_DOWN_RIGHT},
+{1009, CMD_MOVE_UP_RIGHT},
+{1007, CMD_MOVE_UP_LEFT},
+{1005, CMD_REST},
{'a', CMD_USE_ABILITY},
{'c', CMD_BUTCHER},
{'d', CMD_DROP},
diff --git a/crawl-ref/source/libunix.cc b/crawl-ref/source/libunix.cc
index 99b0d2ef90..e1d3b71df4 100644
--- a/crawl-ref/source/libunix.cc
+++ b/crawl-ref/source/libunix.cc
@@ -451,33 +451,24 @@ int unixcurses_get_vi_key(int keyin)
{
switch(keyin)
{
- case 1001: return 'b';
- case 1002: return 'j';
- case 1003: return 'n';
- case 1004: return 'h';
- case 1005: return '5';
- case 1006: return 'l';
- case 1007: return 'y';
- case 1008: return 'k';
- case 1009: return 'u';
-
- case 1031: return 'y';
- case 1034: return 'b';
- case 1040: return '5';
-
- case KEY_HOME: return 'y';
- case KEY_END: return 'b';
- case KEY_DOWN: return 'j';
- case KEY_UP: return 'k';
- case KEY_LEFT: return 'h';
- case KEY_RIGHT: return 'l';
- case KEY_NPAGE: return 'n';
- case KEY_PPAGE: return 'u';
- case KEY_A1: return 'y';
- case KEY_A3: return 'u';
- case KEY_B2: return '5';
- case KEY_C1: return 'b';
- case KEY_C3: return 'n';
+ // 1001..1009: passed without change
+ case 1031: return 1007;
+ case 1034: return 1001;
+ case 1040: return 1005;
+
+ case KEY_HOME: return 1007;
+ case KEY_END: return 1001;
+ case KEY_DOWN: return 1002;
+ case KEY_UP: return 1008;
+ case KEY_LEFT: return 1004;
+ case KEY_RIGHT: return 1006;
+ case KEY_NPAGE: return 1003;
+ case KEY_PPAGE: return 1009;
+ case KEY_A1: return 1007;
+ case KEY_A3: return 1009;
+ case KEY_B2: return 1005;
+ case KEY_C1: return 1001;
+ case KEY_C3: return 1003;
case KEY_SHOME: return 'Y';
case KEY_SEND: return 'B';
case KEY_SLEFT: return 'H';