comparison rogue3/mdport.c @ 55:e7dc901146f1

rogue3: improve keypad support.
author elwin
date Fri, 28 Oct 2011 15:45:12 +0000
parents d388234c4ce9
children 07c4d4883ef2
comparison
equal deleted inserted replaced
54:a31b2cb545c5 55:e7dc901146f1
1247 1247
1248 /* ESC [ - Win32 Telnet, PuTTY */ 1248 /* ESC [ - Win32 Telnet, PuTTY */
1249 case '1': lastch = 'y'; mode=M_TRAIL; break; /* Home */ 1249 case '1': lastch = 'y'; mode=M_TRAIL; break; /* Home */
1250 case '4': lastch = 'b'; mode=M_TRAIL; break; /* End */ 1250 case '4': lastch = 'b'; mode=M_TRAIL; break; /* End */
1251 1251
1252 /* ESC [ - tmux calling itself screen */
1253 case 'E': ch = '.'; break; /* Keypad 5 */
1254
1252 /* ESC O - PuTTY */ 1255 /* ESC O - PuTTY */
1253 case 'D': ch = CTRL('H'); break; 1256 case 'D': ch = CTRL('H'); break;
1254 case 'C': ch = CTRL('L'); break; 1257 case 'C': ch = CTRL('L'); break;
1255 case 'A': ch = CTRL('K'); break; 1258 case 'A': ch = CTRL('K'); break;
1256 case 'B': ch = CTRL('J'); break; 1259 case 'B': ch = CTRL('J'); break;
1292 case KEY_END : ch = 'b'; break; 1295 case KEY_END : ch = 'b'; break;
1293 #ifdef KEY_LL 1296 #ifdef KEY_LL
1294 case KEY_LL : ch = 'b'; break; 1297 case KEY_LL : ch = 'b'; break;
1295 #endif 1298 #endif
1296 case KEY_NPAGE : ch = 'n'; break; 1299 case KEY_NPAGE : ch = 'n'; break;
1300 case KEY_BEG : ch = '.'; break;
1297 1301
1298 #ifdef KEY_B1 1302 #ifdef KEY_B1
1299 case KEY_B1 : ch = 'h'; break; 1303 case KEY_B1 : ch = 'h'; break;
1300 case KEY_C2 : ch = 'j'; break; 1304 case KEY_C2 : ch = 'j'; break;
1301 case KEY_A2 : ch = 'k'; break; 1305 case KEY_A2 : ch = 'k'; break;
1304 case KEY_A1 : ch = 'y'; break; 1308 case KEY_A1 : ch = 'y'; break;
1305 case KEY_A3 : ch = 'u'; break; 1309 case KEY_A3 : ch = 'u'; break;
1306 case KEY_C1 : ch = 'b'; break; 1310 case KEY_C1 : ch = 'b'; break;
1307 case KEY_C3 : ch = 'n'; break; 1311 case KEY_C3 : ch = 'n'; break;
1308 /* next should be '.', but for problem with putty/linux */ 1312 /* next should be '.', but for problem with putty/linux */
1309 case KEY_B2 : ch = 'u'; break; 1313 /* Can't reproduce this "problem", changing it. -elwin */
1314 case KEY_B2 : ch = '.'; break;
1310 1315
1311 #ifdef KEY_SLEFT 1316 #ifdef KEY_SLEFT
1312 case KEY_SRIGHT : ch = CTRL('L'); break; 1317 case KEY_SRIGHT : ch = CTRL('L'); break;
1313 case KEY_SLEFT : ch = CTRL('H'); break; 1318 case KEY_SLEFT : ch = CTRL('H'); break;
1314 #ifdef KEY_SUP 1319 #ifdef KEY_SUP