Mercurial > hg > early-roguelike
comparison rogue4/mdport.c @ 56:3c5682bbf164
Improve support for keypad 5.
author | elwin |
---|---|
date | Fri, 28 Oct 2011 16:00:05 +0000 |
parents | 107a467612fb |
children | ba9930a7f99d |
comparison
equal
deleted
inserted
replaced
55:e7dc901146f1 | 56:3c5682bbf164 |
---|---|
1170 | 1170 |
1171 /* ESC [ - Win32 Telnet, PuTTY */ | 1171 /* ESC [ - Win32 Telnet, PuTTY */ |
1172 case '1': lastch = 'y'; mode=M_TRAIL; break; /* Home */ | 1172 case '1': lastch = 'y'; mode=M_TRAIL; break; /* Home */ |
1173 case '4': lastch = 'b'; mode=M_TRAIL; break; /* End */ | 1173 case '4': lastch = 'b'; mode=M_TRAIL; break; /* End */ |
1174 | 1174 |
1175 /* ESC [ - not understood by screen/tmux */ | |
1176 case 'E': ch = '.'; break; /* Keypad 5 */ | |
1177 | |
1175 /* ESC O - PuTTY */ | 1178 /* ESC O - PuTTY */ |
1176 case 'D': ch = MOD_MOVE('H'); break; | 1179 case 'D': ch = MOD_MOVE('H'); break; |
1177 case 'C': ch = MOD_MOVE('L'); break; | 1180 case 'C': ch = MOD_MOVE('L'); break; |
1178 case 'A': ch = MOD_MOVE('K'); break; | 1181 case 'A': ch = MOD_MOVE('K'); break; |
1179 case 'B': ch = MOD_MOVE('J'); break; | 1182 case 'B': ch = MOD_MOVE('J'); break; |
1215 case KEY_END : ch = 'b'; break; | 1218 case KEY_END : ch = 'b'; break; |
1216 #ifdef KEY_LL | 1219 #ifdef KEY_LL |
1217 case KEY_LL : ch = 'b'; break; | 1220 case KEY_LL : ch = 'b'; break; |
1218 #endif | 1221 #endif |
1219 case KEY_NPAGE : ch = 'n'; break; | 1222 case KEY_NPAGE : ch = 'n'; break; |
1223 case KEY_BEG : ch = '.'; break; | |
1220 | 1224 |
1221 #ifdef KEY_B1 | 1225 #ifdef KEY_B1 |
1222 case KEY_B1 : ch = 'h'; break; | 1226 case KEY_B1 : ch = 'h'; break; |
1223 case KEY_C2 : ch = 'j'; break; | 1227 case KEY_C2 : ch = 'j'; break; |
1224 case KEY_A2 : ch = 'k'; break; | 1228 case KEY_A2 : ch = 'k'; break; |
1226 #endif | 1230 #endif |
1227 case KEY_A1 : ch = 'y'; break; | 1231 case KEY_A1 : ch = 'y'; break; |
1228 case KEY_A3 : ch = 'u'; break; | 1232 case KEY_A3 : ch = 'u'; break; |
1229 case KEY_C1 : ch = 'b'; break; | 1233 case KEY_C1 : ch = 'b'; break; |
1230 case KEY_C3 : ch = 'n'; break; | 1234 case KEY_C3 : ch = 'n'; break; |
1231 /* next should be '.', but for problem with putty/linux */ | 1235 case KEY_B2 : ch = '.'; break; |
1232 case KEY_B2 : ch = 'u'; break; | |
1233 | 1236 |
1234 #ifdef KEY_SLEFT | 1237 #ifdef KEY_SLEFT |
1235 case KEY_SRIGHT : ch = MOD_MOVE('L'); break; | 1238 case KEY_SRIGHT : ch = MOD_MOVE('L'); break; |
1236 case KEY_SLEFT : ch = MOD_MOVE('H'); break; | 1239 case KEY_SLEFT : ch = MOD_MOVE('H'); break; |
1237 #ifdef KEY_SUP | 1240 #ifdef KEY_SUP |