release 1.12.1
[descalc.git] / 12_bindings.pm
1 # key bindings for DCT, by Shiar
2
3 # 1.09.3 200410142200 - enter sent as chr 10 on non-curses terminals
4 # 1.09.2 200410120145 - alt+backspace and ^W for (hard) drop
5 # 1.09.1 200410112145 - function keys moved to menu.pm
6 # 1.08.2 200409270049 - single key alias to chs: \ (often close to _)
7 # 1.08.1 200409270040 - moved from 1.8 main
8
9 use strict;
10 use warnings;
11
12 %alias = (
13         chr 4              => "quit",    # ^D
14         chr 9              => "more",    # tab
15         "\014"             => "refresh", # ^L
16 #       "\033\133\110"     => "refresh", # home
17         '_'                => "chs",     # easy to remember, difficult to type
18         '\\'               => "chs",     # single key
19 #       'y'                => "chs",     # redundant hp48 compatibility
20 #       'z'                => "eex",     # redundant hp48 compatibility
21         "\033\133\062\176" => "eex",     # ins
22         "\033\133\063\176" => "clear",   # del
23             "\177"         => "back",    # backspace
24             "\010"         => "back",    # backspace
25         "\033\010"         => "drop",    # alt+backspace
26         "\033\177"         => "drop",    # alt+backspace
27             "\027"         => "drop",    # ^W
28         chr 10             => "enter",   # enter (terminal)
29         chr 13             => "enter",   # enter (curses)
30         ' '                => "enter",   # space
31         '='                => "sto",     #
32
33         "\033\133\101"     => "stack",   # up    - 48: k (stack)
34         "\033\133\104"     => "undo",    # left  - 48: p (picture)
35 #       "\033\133\102"     => '',        # down  - 48: q (view)
36         "\033\133\103"     => "swap",    # right - 48: r (swap)
37
38         '&'                => "and",
39         '|'                => "or",
40         '#'                => "xor",
41         '~'                => "not",
42         '('                => "sl",
43         ')'                => "sr",
44
45             "s"            => "sin",
46         "\033s"            => "asin",
47             "o"            => "cos", # or u?
48         "\033o"            => "acos",
49             "t"            => "tan",
50         "\033t"            => "atan",
51             "l"            => "log",
52         "\033l"            => "alog",
53             "n"            => "ln",
54         "\033n"            => "exp",
55             "q"            => "sq",
56         "\033q"            => "sqrt",
57             "x"            => "^",
58         "\033x"            => "xroot",
59         "\033^"            => "xroot",   # for consistency
60             "v"            => "inv",
61 ); # %alias
62
63 return {
64         author  => "Shiar",
65         title   => "default key bindings",
66         version => "1.9.3",
67 };
68