[w3m-dev 03844] w3mhelp.cgi update
* scripts/w3mhelp-funcdesc.en.pl.in: add %menu_funcdesc * scripts/w3mhelp-funcdesc.ja.pl.in: add %menu_funcdesc update %title * scripts/w3mhelp-funcname.pl.in: add %menu_funcname add %menu_keyfunc * scripts/w3mhelp.cgi.in: modified for menu link to keymap From: Hironori SAKAMOTO <hsaka@mth.biglobe.ne.jp>
This commit is contained in:
@@ -24,4 +24,23 @@
|
||||
'LINEEDIT:ACCEPT', 'Accept',
|
||||
);
|
||||
|
||||
%menu_funcdesc = (
|
||||
'MENU:SELECT', 'Select item',
|
||||
'MENU:CLOSE', 'Close menu',
|
||||
'MENU:CANCEL', 'Back',
|
||||
'MENU:DOWN', 'Move to next item',
|
||||
'MENU:UP', 'Move to previous item',
|
||||
'MENU:LINE_UP', 'Scroll up one item',
|
||||
'MENU:LINE_DOWN', 'Scroll down one item',
|
||||
'MENU:TOP', 'Go to top item',
|
||||
'MENU:LAST', 'Go to last item',
|
||||
'MENU:NEXT', 'Go to next page',
|
||||
'MENU:PREV', 'Go to previous page',
|
||||
'MENU:SEARCH_FORE', 'Search foreward',
|
||||
'MENU:SEARCH_BACK', 'Search backward',
|
||||
'MENU:SEARCH_NEXT', 'Search next regexp',
|
||||
'MENU:SEARCH_PREV', 'Search previous regexp',
|
||||
'MENU:SUSPEND', 'Suspend',
|
||||
);
|
||||
|
||||
1;
|
||||
|
@@ -24,7 +24,27 @@
|
||||
'LINEEDIT:ACCEPT', '<27><><EFBFBD>Ͻ<EFBFBD>λ',
|
||||
);
|
||||
|
||||
%menu_funcdesc = (
|
||||
'MENU:SELECT', '<27><><EFBFBD>ܤ<EFBFBD><DCA4><EFBFBD><EFBFBD><EFBFBD>',
|
||||
'MENU:CLOSE', '<27><><EFBFBD>˥塼<CBA5><E5A1BC><EFBFBD>Ĥ<EFBFBD><C4A4><EFBFBD>',
|
||||
'MENU:CANCEL', '<27><><EFBFBD><EFBFBD>',
|
||||
'MENU:DOWN', '<27><><EFBFBD>IJ<EFBFBD><C4B2>ι<EFBFBD><CEB9>ܤ<EFBFBD>',
|
||||
'MENU:UP', '<27><><EFBFBD>ľ<EFBFBD><C4BE>ι<EFBFBD><CEB9>ܤ<EFBFBD>',
|
||||
'MENU:LINE_UP', '<27><><EFBFBD>ܤ˥<F2B2BCA4><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
'MENU:LINE_DOWN', '<27><><EFBFBD>ܤ<EFBFBD><DCA4><EFBFBD><EFBFBD>˥<EFBFBD><CBA5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
'MENU:TOP', '<27><>Ƭ<EFBFBD>ι<EFBFBD><CEB9>ܤ<EFBFBD>',
|
||||
'MENU:LAST', '<27>Ǹ<EFBFBD><C7B8>ι<EFBFBD><CEB9>ܤ<EFBFBD>',
|
||||
'MENU:NEXT', '<27><><EFBFBD>ڡ<EFBFBD><DAA1><EFBFBD><EFBFBD>ι<EFBFBD><CEB9>ܤ<EFBFBD>',
|
||||
'MENU:PREV', '<27><><EFBFBD>ڡ<EFBFBD><DAA1><EFBFBD><EFBFBD>ι<EFBFBD><CEB9>ܤ<EFBFBD>',
|
||||
'MENU:SEARCH_FORE', '<27><><EFBFBD>ܤ˸<F2B2BCA4><CBB8><EFBFBD><EFBFBD>äƸ<C3A4><C6B8><EFBFBD>',
|
||||
'MENU:SEARCH_BACK', '<27><><EFBFBD>ܤ<EFBFBD><DCA4><EFBFBD><EFBFBD>˸<EFBFBD><CBB8><EFBFBD><EFBFBD>äƸ<C3A4><C6B8><EFBFBD>',
|
||||
'MENU:SEARCH_NEXT', '<27><><EFBFBD>ι<EFBFBD><CEB9>ܤ<DCA4>',
|
||||
'MENU:SEARCH_PREV', '<27><><EFBFBD>ι<EFBFBD><CEB9>ܤ<DCA4>',
|
||||
'MENU:SUSPEND', '<27><><EFBFBD><EFBFBD><EFBFBD>ڥ<EFBFBD><DAA5><EFBFBD>',
|
||||
);
|
||||
|
||||
%title = (
|
||||
"Show keymap file", 'keymap <20>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
"Page/Cursor motion", '<27>ڡ<EFBFBD><DAA1><EFBFBD>/<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ư',
|
||||
"Hyperlink operation", '<27>ϥ<EFBFBD><CFA5>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
"File/Stream operation", '<27>ե<EFBFBD><D5A5><EFBFBD><EFBFBD><EFBFBD>/<2F><><EFBFBD>ȥ<C8A5><EAA1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
@@ -36,7 +56,9 @@
|
||||
"Dictionary look-up", '<27><><EFBFBD><EFBFBD>',
|
||||
"Mark operation", '<27>ޡ<EFBFBD><DEA1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
"Miscellany", '<27><><EFBFBD><EFBFBD>¾',
|
||||
"User defined keymaps", '<27>桼<EFBFBD><E6A1BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>',
|
||||
"Line-edit mode", '<27><><EFBFBD>Խ<EFBFBD><D4BD>⡼<EFBFBD><E2A1BC>',
|
||||
"Popup menu", '<27><><EFBFBD>˥塼',
|
||||
);
|
||||
|
||||
1;
|
||||
|
@@ -22,6 +22,25 @@
|
||||
'LINEEDIT:ACCEPT', 'lineedit_accept',
|
||||
);
|
||||
|
||||
%menu_funcname = (
|
||||
'MENU:SELECT', 'menu_select',
|
||||
'MENU:CLOSE', 'menu_close',
|
||||
'MENU:CANCEL', 'menu_cancel',
|
||||
'MENU:DOWN', 'menu_down',
|
||||
'MENU:UP', 'menu_up',
|
||||
'MENU:LINE_UP', 'menu_line_up',
|
||||
'MENU:LINE_DOWN', 'menu_line_down',
|
||||
'MENU:TOP', 'menu_top',
|
||||
'MENU:LAST', 'menu_last',
|
||||
'MENU:NEXT', 'menu_next',
|
||||
'MENU:PREV', 'menu_prev',
|
||||
'MENU:SEARCH_FORE', 'menu_search_fore',
|
||||
'MENU:SEARCH_BACK', 'menu_search_back',
|
||||
'MENU:SEARCH_NEXT', 'menu_search_next',
|
||||
'MENU:SEARCH_PREV', 'menu_search_prev',
|
||||
'MENU:SUSPEND', 'menu_suspend',
|
||||
);
|
||||
|
||||
%buf_keyfunc = (
|
||||
'k', 'BUF:PREV',
|
||||
'C-p', 'BUF:PREV',
|
||||
@@ -48,4 +67,39 @@
|
||||
'RET', 'LINEEDIT:ACCEPT'
|
||||
);
|
||||
|
||||
%menu_keyfunc = (
|
||||
'RET', 'MENU:SELECT',
|
||||
'SPC', 'MENU:SELECT',
|
||||
'RIGHT', 'MENU:SELECT',
|
||||
'^[[28~', 'MENU:CLOSE',
|
||||
'^[[2~', 'MENU:CLOSE',
|
||||
'C-c', 'MENU:CLOSE',
|
||||
'C-h', 'MENU:CANCEL',
|
||||
'DEL', 'MENU:CANCEL',
|
||||
'LEFT', 'MENU:CANCEL',
|
||||
'C-n', 'MENU:DOWN',
|
||||
'j', 'MENU:DOWN',
|
||||
'DOWN', 'MENU:DOWN',
|
||||
'C-p', 'MENU:UP',
|
||||
'k', 'MENU:UP',
|
||||
'UP', 'MENU:UP',
|
||||
'K', 'MENU:LINE_UP',
|
||||
'J', 'MENU:LINE_DOWN',
|
||||
'C-a', 'MENU:TOP',
|
||||
'C-e', 'MENU:LAST',
|
||||
'C-f', 'MENU:NEXT',
|
||||
'C-v', 'MENU:NEXT',
|
||||
'^[[6~', 'MENU:NEXT',
|
||||
'C-b', 'MENU:PREV',
|
||||
'ESC-v', 'MENU:PREV',
|
||||
'^[[5~', 'MENU:PREV',
|
||||
'C-s', 'MENU:SEARCH_FORE',
|
||||
'/', 'MENU:SEARCH_FORE',
|
||||
'C-r', 'MENU:SEARCH_BACK',
|
||||
'?', 'MENU:SEARCH_BACK',
|
||||
'n', 'MENU:SEARCH_NEXT',
|
||||
'N', 'MENU:SEARCH_PREV',
|
||||
'C-z', 'MENU:SUSPEND',
|
||||
);
|
||||
|
||||
1;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!@PERL@
|
||||
# $Id: w3mhelp.cgi.in,v 1.24 2003/01/23 18:37:22 ukai Exp $
|
||||
# $Id: w3mhelp.cgi.in,v 1.25 2003/04/07 15:19:46 ukai Exp $
|
||||
|
||||
if ( $^O =~ /^(ms)?(dos|win(32|nt)?)/i ) {
|
||||
$CYGPATH = 1;
|
||||
@@ -66,14 +66,15 @@ if (-f $keymap) {
|
||||
|
||||
local (%funckeydesc, $key, $fname, $desc);
|
||||
|
||||
%funcname = (%funcname, %buf_funcname, %lineedit_funcname);
|
||||
%funcname = (%funcname, %buf_funcname, %lineedit_funcname, %menu_funcname);
|
||||
|
||||
%funcdesc = (%funcdesc, %buf_funcdesc, %lineedit_funcdesc);
|
||||
%funcdesc = (%funcdesc, %buf_funcdesc, %lineedit_funcdesc, %menu_funcdesc);
|
||||
while (($fname, $desc) = each %funcdesc) {
|
||||
$funckeydesc{$funcname{$fname}} = "$desc\n";
|
||||
$funckeydesc{$funcname{$fname}} = "$fname\n$desc\n";
|
||||
}
|
||||
|
||||
while (($key, $fname) = each %keyfunc) {
|
||||
$keydata{$key} && next;
|
||||
$funckeydesc{$funcname{$fname}} .= "$key,";
|
||||
}
|
||||
while (($key, $fname) = each %buf_keyfunc) {
|
||||
@@ -82,6 +83,9 @@ while (($key, $fname) = each %buf_keyfunc) {
|
||||
while (($key, $fname) = each %lineedit_keyfunc) {
|
||||
$funckeydesc{$funcname{$fname}} .= "$key,";
|
||||
}
|
||||
while (($key, $fname) = each %menu_keyfunc) {
|
||||
$funckeydesc{$funcname{$fname}} .= "$key,";
|
||||
}
|
||||
|
||||
print <<HEADING;
|
||||
Content-Type: text/html
|
||||
@@ -111,10 +115,18 @@ for $otherlang (@docdirs) {
|
||||
|
||||
if ($d[1] ne $lang) {
|
||||
$d[1] =~ s/[^A-Za-z0-9_\$\.\-]/sprintf('%%%02X', ord($&))/ge;
|
||||
print $script, $d[1], "\">$d[2] version</A><BR>\n";
|
||||
print $script, $d[1], "\">$d[2] version</A>\n";
|
||||
}
|
||||
}
|
||||
|
||||
$keymap =~ s/[<>&]/$htmlesc{$&}/ge;
|
||||
$head = "Show keymap file";
|
||||
if (defined($title{$head})) {
|
||||
$head = $title{$head};
|
||||
$head =~ s/[<>&]/$htmlesc{$&}/ge;
|
||||
}
|
||||
print "<P><A HREF=\"$keymap\">$head</A>\n";
|
||||
|
||||
&show_keymap("Page/Cursor motion",
|
||||
split(" ", "pgFore pgBack movR movL movD movU
|
||||
movR1 movL1 movD1 movU1 ldown1 lup1
|
||||
@@ -157,15 +169,29 @@ for $otherlang (@docdirs) {
|
||||
msgs msToggle wrapToggle execCmd setAlarm setOpt setEnv defKey
|
||||
reinit execsh susp qquitfm quitfm"));
|
||||
|
||||
&show_keymap_data("User defined keymaps");
|
||||
|
||||
print "<BR>\n<HR WIDTH=80%>\n";
|
||||
|
||||
&show_keymap("Buffer selection mode",
|
||||
split(" ", "buffer_next buffer_prev buffer_delete buffer_go"));
|
||||
|
||||
print "<BR>\n<HR WIDTH=80%>\n";
|
||||
|
||||
&show_keymap("Line-edit mode",
|
||||
split(" ", "lineedit_forward lineedit_back lineedit_backspace
|
||||
lineedit_delete lineedit_kill_after lineedit_kill_before
|
||||
lineedit_top lineedit_bottom lineedit_prev lineedit_next
|
||||
lineedit_editor lineedit_complete lineedit_accept"));
|
||||
|
||||
print "<BR>\n<HR WIDTH=80%>\n";
|
||||
|
||||
&show_keymap("Popup menu",
|
||||
split(" ", "menu_select menu_close menu_cancel menu_down menu_up
|
||||
menu_line_up menu_line_down menu_top menu_last menu_next
|
||||
menu_prev menu_search_fore menu_search_back menu_search_next
|
||||
menu_search_prev menu_suspend"));
|
||||
|
||||
print <<PAGE;
|
||||
<HR>
|
||||
</BODY>
|
||||
@@ -183,12 +209,17 @@ sub load_keymap {
|
||||
s/^\s*keymap\s+// || next;
|
||||
s/^(\"(\\\"|[^\"])+\"|\'(\\\'|[^\'])+\'|\S+)\s+(\S+)\s*// || next;
|
||||
($key, $fname) = ($1, $4);
|
||||
($data = $_) && next;
|
||||
$data = $_;
|
||||
$fname =~ tr/a-z/A-Z/;
|
||||
defined($funcdesc{$fname}) || next;
|
||||
$key =~ s/^["'](.*)["']$/$1/;
|
||||
$key = &norm_key($key);
|
||||
$keyfunc{$key} = $fname;
|
||||
if ($data) {
|
||||
$keydata{$key} = $data;
|
||||
} else {
|
||||
delete $keydata{$key};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,13 +258,47 @@ sub show_keymap {
|
||||
<table cellpadding=0>
|
||||
PAGE
|
||||
foreach $fid (@list) {
|
||||
local ($desc, $keys) = split("\n", $funckeydesc{$fid}, 2);
|
||||
local ($name, $desc, $keys) = split("\n", $funckeydesc{$fid}, 3);
|
||||
$keys =~ s/,$//;
|
||||
$keys = '<NOT ASSIGNED>' if ($keys eq '');
|
||||
$keys =~ s/[<>&]/$htmlesc{$&}/ge;
|
||||
if ($name =~ /:/) {
|
||||
$name = "";
|
||||
} else {
|
||||
$name =~ s/[<>&]/$htmlesc{$&}/ge;
|
||||
$name = " (<b>$name</b>)";
|
||||
}
|
||||
$desc =~ s/[<>&]/$htmlesc{$&}/ge;
|
||||
print <<PAGE;
|
||||
<TR><TD$attr>$keys<TD>$desc
|
||||
<TR><TD$attr>$keys<TD><NOBR>$desc$name</NOBR>
|
||||
PAGE
|
||||
$attr = "";
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
sub show_keymap_data {
|
||||
local($head, @list) = @_;
|
||||
local($fid);
|
||||
local($attr) = " WIDTH=140";
|
||||
|
||||
if (defined($title{$head})) {
|
||||
$head = $title{$head};
|
||||
$head =~ s/[<>&]/$htmlesc{$&}/ge;
|
||||
}
|
||||
|
||||
print <<PAGE;
|
||||
<H2>$head</H2>
|
||||
<table cellpadding=0>
|
||||
PAGE
|
||||
foreach $keys (sort keys %keydata) {
|
||||
$keys =~ s/[<>&]/$htmlesc{$&}/ge;
|
||||
$name = $keyfunc{$keys};
|
||||
$data = $keydata{$keys};
|
||||
$name =~ s/[<>&]/$htmlesc{$&}/ge;
|
||||
$data =~ s/[<>&]/$htmlesc{$&}/ge;
|
||||
print <<PAGE;
|
||||
<TR><TD$attr>$keys<TD>$name<TD><NOBR>$data</NOBR>
|
||||
PAGE
|
||||
$attr = "";
|
||||
}
|
||||
|
Reference in New Issue
Block a user