# key bindings for DCT, by Shiar

# 1.09.3 200410142200 - enter sent as chr 10 on non-curses terminals
# 1.09.2 200410120145 - alt+backspace and ^W for (hard) drop
# 1.09.1 200410112145 - function keys moved to menu.pm
# 1.08.2 200409270049 - single key alias to chs: \ (often close to _)
# 1.08.1 200409270040 - moved from 1.8 main

use strict;
use warnings;

%alias = (
	chr 4              => "quit",    # ^D
	chr 9              => "more",    # tab
	"\014"             => "refresh", # ^L
#	"\033\133\110"     => "refresh", # home
	'_'                => "chs",     # easy to remember, difficult to type
	'\\'               => "chs",     # single key
#	'y'                => "chs",     # redundant hp48 compatibility
#	'z'                => "eex",     # redundant hp48 compatibility
	"\033\133\062\176" => "eex",     # ins
	"\033\133\063\176" => "clear",   # del
	    "\177"         => "back",    # backspace
	    "\010"         => "back",    # backspace
	"\033\010"         => "drop",    # alt+backspace
	"\033\177"         => "drop",    # alt+backspace
	    "\027"         => "drop",    # ^W
	chr 10             => "enter",   # enter (terminal)
	chr 13             => "enter",   # enter (curses)
	' '                => "enter",   # space
	'='                => "sto",     #

	"\033\133\101"     => "stack",   # up    - 48: k (stack)
	"\033\133\104"     => "undo",    # left  - 48: p (picture)
#	"\033\133\102"     => '',        # down  - 48: q (view)
	"\033\133\103"     => "swap",    # right - 48: r (swap)

	'&'                => "and",
	'|'                => "or",
	'#'                => "xor",
	'~'                => "not",
	'('                => "sl",
	')'                => "sr",

	    "s"            => "sin",
	"\033s"            => "asin",
	    "o"            => "cos", # or u?
	"\033o"            => "acos",
	    "t"            => "tan",
	"\033t"            => "atan",
	    "l"            => "log",
	"\033l"            => "alog",
	    "n"            => "ln",
	"\033n"            => "exp",
	    "q"            => "sq",
	"\033q"            => "sqrt",
	    "x"            => "^",
	"\033x"            => "xroot",
	"\033^"            => "xroot",   # for consistency
	    "v"            => "inv",
); # %alias

return {
	author  => "Shiar",
	title   => "default key bindings",
	version => "1.9.3",
};

