1#----------------------------------------------------------------------------
2# help_keys w
3#
4# Create a top-level window that displays info for On keys.. help item.
5# Maurice LeBrun, IFS
6# Adapted from mkStyles.tcl from widget demo.
7#
8# Arguments:
9#    w -	Name to use for new top-level window.
10#----------------------------------------------------------------------------
11
12proc help_keys {{w .help_keys}} {
13    catch {destroy $w}
14    toplevel $w
15    dpos $w
16    wm title $w "Help on keys"
17    wm iconname $w "help_keys"
18    normal_text_setup $w
19
20    insertWithTags $w.t {\
21When a plframe widget has the input focus, keyboard input is relayed to
22its remote TK driver.  The default actions of the keyboard handler are as
23follows:
24
25	"Q" | <Ctrl-x>		Terminate program
26	<Return> or <Page Down>	Advance to the next page
27	"m"			Toogle top menus
28	"z"			enter zoom (Cliking once zooms x 2)
29	"b"			back zoom
30	"f"			forward zoom
31	"r"			reset zoom
32	"P"			print
33	"s"			save again
34	"5"			scroll magnification factor ??
35	"1"			scroll speed	??
36	<left><right><up><down>	scroll after zoom
37	<Alt><key>		increase scroll speed
38
39The user code can supply its own keyboard handler, and thereby add to
40or modify these actions (this is in fact what is done by plrender).
41
42} normal
43    insertWithTags $w.t {
44plrender} bold
45    insertWithTags $w.t {\
46 supports the following additional set of actions:
47
48<Backspace>
49<Delete>	Back page
50<Page up>
51
52+<n><Return>	Seek forward <n> pages.
53-<n><Return>	Seek backward <n> pages.
54
55<n><Return>	Seek to page <n>.
56
57Both <Backspace> and <Delete> are recognized for a back-page since the
58target system may use either as its erase key.  <Page Up> is present on
59some keyboards (different from keypad key).
60} normal
61    $w.t configure -state disabled
62    $w.t mark set insert 0.0
63}
64