use utf8;
{
key => {
	'~' => "open home<>dir",
	'@' => "play macro",
	'^' => "left of page",
	'$' => "right of page",
	'#' => "rev. find word",
	'*' => "find word",
	'^^'=> "last tab",
	'?' => "find rev.",
	'/' => "find",
	'[' => "focus forw<>ard",
	']' => "focus back",
	':' => "comm<>and line mode",
	';' => "extend<>ed hint<>s mode",
	"'" => "jump to mark",
	'|' => "toggle source",

	'a' => "add bookm<>ark",
	'A' => "toggle bookm<>ark<>ed",
	'^a'=> "incr<>em<>ent url nr",
	'b' => "to buffer",
	'B' => "list buffers",
	'^b'=> "page up",
	'^c'=> "stop loading",
	'^d'=> "scroll down",
	'd' => "close tab",
	'D' => "close tab left<>ward<>s",
	'i' => "caret mode",
	'f' => "quick<>hint mode",
	'F' => "f in tab",
	'^f'=> "page down",
	'g' => "extra cmds",
	'G' => "last/% line",
	'^g'=> "file name",
	'h' => "<left>",
	'H' => "page back",
	'j' => "<down>",
	'k' => "<up>",
	'l' => "<right>",
	'L' => "page forw<>ard",
	'M' => "mark url",
	'm' => "mark line",
	'n' => "find next",
	'N' => "find prev<>ious",
	'^n'=> "next tab",
	'o' => "open",
	'O' => "alter url",
	'p' => "open pasted url",
	'P' => "p in tab",
	'q' => "record macro",
	'r' => "reload page",
	'R' => "reload uncach<>e<>d",
	't' => "tab open new",
	'T' => "tab open curr<>ent",
	'^v'=> "pass single",
	'^u'=> "scroll up",
	'u' => "restore closed tab",
	'^x'=> "decr<>em<>ent url nr",
	'y' => "copy url",
	'Y' => "copy select<>ion",
	'z' => "zoom",
	'Z' => "quit",
	'^z'=> "pass throu<>gh",

	'g0' => "first tab",
	'g$' => "last tab",

	'gb' => "repeat buffer cmd",
	'gB' => "reverse gb",
	'gf' => "view source",
	'gF' => "source extern<>al",
	'g^g'=> "file details",
	'gg' => "first line",
	'gh' => "open home<>page",
	'gH' => "tab with home<>page",
	'gi' => "last input field",
	'gn' => "tabopen url mark\nGo in New tab",
	'go' => "open url mark",
	'gP' => "<alias>P inactive",
	'gt' => "switch tab",
	'gT' => "tab back",
	'gu' => "parent dir<>ectory",
	'gU' => "site root",

	';;' => "focus",
	';?' => "element details",
	';a' => "save prompt",
	';b' => "open bg tab",
	';c' => "context menu",
	';f' => "frame focus",
	';F' => "multiple bg tabs",
	';i' => "image",
	';I' => "image in tab",
	';o' => "open",
	';O' => "open prompt",
	';s' => "save",
	';t' => "open in tab",
	';T' => "tab prompt",
	';v' => "view source",
	';w' => "open in wind<>ow",
	';W' => "wind<>ow prompt",
	';y' => "copy url",
	';Y' => "copy text",

	']f' => "next frame<>set",
	']]' => "open <q>next</q>",

	'[f' => "previous frame<>set",
	'[[' => "open <q>prev</q>",

	'zi' => "en<>large text\nZoom In",
	'zm' => "en<>large more\nZoom More",
	'zo' => "shrink text\nZoom Out",
	'zr' => "tinier text\nZoom Reduce",
	'zz' => "reset text size\nZoom Zero",
	'zI' => "zoom in",
	'zM' => "zoom more",
	'zO' => "zoom out",
	'zR' => "zoom out more\nZoom Reduce",
	'zZ' => "zoom reset\nZoom Zero",

	'ZQ' => "quit no save",
	'ZZ' => "quit save ses<>s<>ion",
},

mode => {
	''  => 'normal mode',
	'g' => 'extended commands (g)',
	';' => 'extended hints (;)',
	']' => '(])',
	'[' => '([)',
	'z' => 'zoom commands (z)',
	'Z' => 'quit commands (Z)',
},

flag => {
	g1 => ['info'     => "Displays something without any permanent consequences."],
	g2 => ['motion'   => "Move cursor, scroll window, focus buffer element."],
	g3 => ['tab'      => "Tab or window navigation/selection."],
	g4 => ['buffer'   => "Page interaction."],
	g5 => ['open'     => "Browse to a location in the current tab."],
	g6 => ['tab open' => "Browse somewhere in a new tab."],
	g7 => ['browser'  => "Other browser action."],
	g8 => ['mode'     => "Enter a different mode."],
	g9 => ['key cmd'  => "Additional key commands (click for overview)."],

	arg  => ["key<arg>"  => "Commands with a dot need a char argument afterwards."],
	args => ["key<args>" => "Commands with two dots require variable arguments afterwards."],
},

def => {
	'' => {
		'~' => 'g5',
		'@' => 'g7 arg',
		'^' => 'g2',
		'0' => '=^',
		'$' => 'g2',
		'#' => 'g2',
		'*' => 'g2',
		'+' => '=zi',
		'-' => '=zo',
		'^^'=> 'g3',
		'?' => 'g2 args modec',
		'/' => 'g2 args modec',
		'[' => 'g9 arg mode[',
		']' => 'g9 arg mode]',
		':' => 'g7 args',
		';' => 'g9 arg args mode;',
		"'" => 'g2',
		'`' => "='",
		'|' => 'g5 v2 v2.2',

		'a' => 'g7 args',
		'A' => 'g7',
		'^a'=> 'g5',
		'b' => 'g3 args',
		'B' => 'g1',
		'^b'=> 'g2',
		'^c'=> 'g4',
		'^d'=> 'g2',
		'd' => 'g4',
		'D' => 'g4',
		'i' => 'g8',
		'^i'=> '=L',
		'^e'=> '=j',
		'f' => 'g5 args',
		'F' => 'g6 args',
		'^f'=> 'g2', # spacebar
		'g' => 'g9 modeg arg',
		'G' => 'g2',
		'^g'=> 'g1',
		'h' => 'g2',
		'H' => 'g5',
		'j' => 'g2',
		'k' => 'g2',
		'l' => 'g2',
		'L' => 'g5',
		'M' => 'g7 arg',
		'm' => 'g7 arg',
		'n' => 'g2',
		'N' => 'g2',
		'^n'=> 'g3',
		'o' => 'g5',
		'O' => 'g5',
		'^o'=> '=H',
		'p' => 'g5',
		'P' => 'g6',
		'^p'=> '=gT',
		'q' => 'g8 arg',
		'r' => 'g4',
		'R' => 'g5',
		't' => 'g6',
		'T' => 'g6',
		'^v'=> 'g4 arg',
		'^u'=> 'g2',
		'u' => 'g6',
		'^x'=> 'g5',
		'y' => 'g7',
		'Y' => 'g7',
		'^y'=> '=k',
		'z' => 'g1 modez arg',
		'Z' => 'g9 modeZ arg',
		'^z'=> 'g8',
	}, # normal mode

	g => {
		lead => 'g',

		'0' => 'g3',
		'$' => 'g3',
		'^' => '=g0',

		'b' => 'g3',
		'B' => 'g3',
		'f' => 'g5',
		'F' => 'g7',
		'^g'=> 'g1',
		'g' => 'g2',
		'h' => 'g5',
		'H' => 'g6',
		'i' => 'g2',
		'n' => 'g6 arg',
		'o' => 'g5 arg',
		'P' => 'g6',
		't' => 'g3',
		'T' => 'g3',
		'u' => 'g5',
		'U' => 'g5',
	}, # mode g

	';' => {
		lead => ';',

		';' => 'g2',
		'?' => 'g1',
		'a' => 'g7 args',
		'b' => 'g6 v2',
		'c' => 'v2 v2.2',
		'f' => 'g2 v2', # previously ';o'
		'F' => 'g6 v2', # previously ';t'
		'i' => 'g5 v2 v2.2',
		'I' => 'g6 v2 v2.2',
		'o' => 'g5',
		'O' => 'g5 args',
		's' => 'g7',
		't' => 'g6',
		'T' => 'g6 args',
		'v' => 'g5',
		'w' => 'g6',
		'W' => 'g6 args',
		'y' => 'g7',
		'Y' => 'g7',
	}, # mode ;

	']' => {
		lead => ']',

		'f' => 'g2',
		']' => 'g5',
	}, # mode ]

	'[' => {
		lead => '[',

		'f' => 'g2',
		'[' => 'g5',
	}, # mode [

	z => {
		lead => 'z',

		'i' => 'g1',
		'm' => 'g1',
		'o' => 'g1',
		'r' => 'g1',
		'z' => 'g1',
		'I' => 'g1',
		'M' => 'g1',
		'O' => 'g1',
		'R' => 'g1',
		'Z' => 'g1',
	}, # mode z

	Z => {
		lead => 'Z',

		'Q' => 'g7',
		'Z' => 'g7',
	}, # mode Z
},
}
