Mercurial > hg > early-roguelike
comparison arogue7/mdport.c @ 149:9aa9b9a2e159
arogue7, xrogue: add support for keypad 5.
Keypad 5 is now equivalent to the '.' key.
XRogue does not include md_readchar() and its ability to work around
deficiencies in the terminfo entry. So the key will not be recognized
in screen/tmux or anywhere else without the kb2 capability. Adding
md_readchar() would be more complex than it was for Super-Rogue, since
XRogue already does KEY_* interpretation in command().
author | John "Elwin" Edwards |
---|---|
date | Wed, 27 May 2015 17:29:32 -0400 |
parents | aac28331e71d |
children | a307ff9cd95e |
comparison
equal
deleted
inserted
replaced
148:c8fc38d903a3 | 149:9aa9b9a2e159 |
---|---|
1071 | 1071 |
1072 /* ESC [ - Win32 Telnet, PuTTY */ | 1072 /* ESC [ - Win32 Telnet, PuTTY */ |
1073 case '1': lastch = 'y'; mode=M_TRAIL; break; /* Home */ | 1073 case '1': lastch = 'y'; mode=M_TRAIL; break; /* Home */ |
1074 case '4': lastch = 'b'; mode=M_TRAIL; break; /* End */ | 1074 case '4': lastch = 'b'; mode=M_TRAIL; break; /* End */ |
1075 | 1075 |
1076 /* ESC [ - screen/tmux */ | |
1077 case 'E': ch = '.'; break; | |
1078 | |
1076 /* ESC O - PuTTY */ | 1079 /* ESC O - PuTTY */ |
1077 case 'D': ch = MOD_MOVE('H'); break; | 1080 case 'D': ch = MOD_MOVE('H'); break; |
1078 case 'C': ch = MOD_MOVE('L'); break; | 1081 case 'C': ch = MOD_MOVE('L'); break; |
1079 case 'A': ch = MOD_MOVE('K'); break; | 1082 case 'A': ch = MOD_MOVE('K'); break; |
1080 case 'B': ch = MOD_MOVE('J'); break; | 1083 case 'B': ch = MOD_MOVE('J'); break; |
1122 #endif | 1125 #endif |
1123 case KEY_A1 : ch = 'y'; break; | 1126 case KEY_A1 : ch = 'y'; break; |
1124 case KEY_A3 : ch = 'u'; break; | 1127 case KEY_A3 : ch = 'u'; break; |
1125 case KEY_C1 : ch = 'b'; break; | 1128 case KEY_C1 : ch = 'b'; break; |
1126 case KEY_C3 : ch = 'n'; break; | 1129 case KEY_C3 : ch = 'n'; break; |
1127 /* next should be '.', but for problem with putty/linux */ | 1130 case KEY_B2 : ch = '.'; break; |
1128 case KEY_B2 : ch = 'u'; break; | |
1129 | 1131 |
1130 #ifdef KEY_SLEFT | 1132 #ifdef KEY_SLEFT |
1131 case KEY_SRIGHT : ch = MOD_MOVE('L'); break; | 1133 case KEY_SRIGHT : ch = MOD_MOVE('L'); break; |
1132 case KEY_SLEFT : ch = MOD_MOVE('H'); break; | 1134 case KEY_SLEFT : ch = MOD_MOVE('H'); break; |
1133 #ifdef KEY_SUP | 1135 #ifdef KEY_SUP |