diff options
author | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-08 20:54:15 +0800 |
---|---|---|
committer | piaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2005-06-08 20:54:15 +0800 |
commit | cf8dee5043a6b6593de2fdb5d1b57a59b46ebd27 (patch) | |
tree | 4508de0cbd0788e5779829fc1a4b8cc173398b3c /mbbsd | |
parent | 49ab5387843086e5051f260870022eaeb1907a7a (diff) | |
download | pttbbs-cf8dee5043a6b6593de2fdb5d1b57a59b46ebd27.tar pttbbs-cf8dee5043a6b6593de2fdb5d1b57a59b46ebd27.tar.gz pttbbs-cf8dee5043a6b6593de2fdb5d1b57a59b46ebd27.tar.bz2 pttbbs-cf8dee5043a6b6593de2fdb5d1b57a59b46ebd27.tar.lz pttbbs-cf8dee5043a6b6593de2fdb5d1b57a59b46ebd27.tar.xz pttbbs-cf8dee5043a6b6593de2fdb5d1b57a59b46ebd27.tar.zst pttbbs-cf8dee5043a6b6593de2fdb5d1b57a59b46ebd27.zip |
towards new experience: Fn Key Bindings, a trial.
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2807 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/edit.c | 19 | ||||
-rw-r--r-- | mbbsd/pmore.c | 11 |
2 files changed, 21 insertions, 9 deletions
diff --git a/mbbsd/edit.c b/mbbsd/edit.c index 124d7d71..f0aa77e1 100644 --- a/mbbsd/edit.c +++ b/mbbsd/edit.c @@ -405,10 +405,11 @@ edit_msg(void) move(b_lines, 0); clrtoeol(); - prints(ANSI_COLOR(37;44) " ½s¿è¤å³¹ " ANSI_COLOR(31;47) " (^Z)" ANSI_COLOR(30) "»¡©ú " - ANSI_COLOR(31;47) "(^P)" ANSI_COLOR(30) "²Å¸¹ " - ANSI_COLOR(31;47) "(^G)" ANSI_COLOR(30) "´¡¤J¹Ï¤å®w " ANSI_COLOR(31) "(^X,^Q)" - ANSI_COLOR(30) "Â÷¶}ùø%s¢x%c%c%c%cùø %3d:%3d " ANSI_RESET, + prints( ANSI_COLOR(37;44) " ½s¿è¤å³¹ " + ANSI_COLOR(31;47) " (^Z/F1)" ANSI_COLOR(30) "»¡©ú " + ANSI_COLOR(31;47) "(^P/^G)" ANSI_COLOR(30) "´¡¤J²Å¸¹/¹Ï¤ù " + ANSI_COLOR(31) "(^X/^Q)" ANSI_COLOR(30) "Â÷¶}" + "ùø%s¢x%c%c%c%cùø %3d:%3d " ANSI_RESET, curr_buf->insert_mode ? "´¡¤J" : "¨ú¥N", curr_buf->ansimode ? 'A' : 'a', curr_buf->indent_mode ? 'I' : 'i', @@ -2618,6 +2619,7 @@ vedit(char *fpath, int saveheader, int *islocal) } switch (ch) { + case KEY_F10: case Ctrl('X'): /* Save and exit */ tmp = write_file(fpath, saveheader, islocal); if (tmp != KEEP_EDITING) { @@ -2633,6 +2635,13 @@ vedit(char *fpath, int saveheader, int *islocal) curr_buf->oldcurrline = curr_buf->currline; curr_buf->redraw_everything = YEA; break; + case KEY_F5: + prompt_goto_line(); + break; + case KEY_F8: + t_users(); + curr_buf->redraw_everything = YEA; + break; case Ctrl('W'): block_cut(); // curr_buf->oldcurrline is freed in block_cut, and currline is @@ -2758,6 +2767,7 @@ vedit(char *fpath, int saveheader, int *islocal) break; #endif case Ctrl('S'): + case KEY_F3: search_str(0); break; case Ctrl('U'): @@ -2822,6 +2832,7 @@ vedit(char *fpath, int saveheader, int *islocal) curr_buf->redraw_everything = YEA; break; + case KEY_F1: case Ctrl('Z'): /* Help */ more("etc/ve.hlp", YEA); curr_buf->redraw_everything = YEA; diff --git a/mbbsd/pmore.c b/mbbsd/pmore.c index ea100416..e3ec9c05 100644 --- a/mbbsd/pmore.c +++ b/mbbsd/pmore.c @@ -1417,7 +1417,7 @@ static const char * const pmore_help[] = { "(k/¡ô) (j/¡õ/Enter) ¤W±²/¤U±²¤@¦æ", "(^B)(PgUp)(BackSpace) ¤W±²¤@¶", "(^F)(PgDn)(Space)(¡÷) ¤U±²¤@¶", - "(,/</S-Tab)(./>/TAB) ¥ª/¥k±²°Ê", + "(,/</S-TAB)(./>/TAB) ¥ª/¥k±²°Ê", "(0/g/Home) ($/G/End) Àɮ׶}ÀY/µ²§À", "(;/:) ¸õ¦Ü¬Y¦æ/¬Y¶", "¼Æ¦rÁä 1-9 ¸õ¦Ü¿é¤Jªº¶¼Æ©Î¦æ¸¹", @@ -1432,7 +1432,7 @@ static const char * const pmore_help[] = { "(\\) ¤Á´«Åã¥Üì©l¤º®e", // this IS already aligned! "(w/W/l) ¤Á´«¦Û°Ê§é¦æ/§é¦æ²Å¸¹/¤À¹j½uÅã¥Ü¤è¦¡", "(p/o) ¼½©ñ°Êµe/¤Á´«¶Ç²Î¼Ò¦¡(ª¬ºA¦C»P§é¦æ¤è¦¡)", - "(q/¡ö) (h/H/?) µ²§ô/¥»»¡©úµe±", + "(q/¡ö) (h/H/?/F1) µ²§ô/¥»»¡©úµe±", #ifdef DEBUG "(d) ¤Á´«°£¿ù(debug)¼Ò¦¡", #endif @@ -1888,9 +1888,10 @@ pmore(char *fpath, int promptend) //if(mf.xpos == 0 || mf.trunclines) mf.xpos = (mf.xpos/8+1)*8; break; - case 'Z': - case '<': /* acronym form shift-tab, ^[[Z */ + /* however some terminals does not send that. */ + case KEY_STAB: + case '<': mf.xpos = (mf.xpos/8-1)*8; if(mf.xpos < 0) mf.xpos = 0; break; @@ -2028,7 +2029,7 @@ pmore(char *fpath, int promptend) } break; - case 'h': case 'H': + case 'h': case 'H': case KEY_F1: case '?': // help show_help(pmore_help); |