###############################################################################
# BRLTTY - A background process providing access to the console screen (when in
#          text mode) for a blind person using a refreshable braille display.
#
# Copyright (C) 1995-2014 by The BRLTTY Developers.
#
# BRLTTY comes with ABSOLUTELY NO WARRANTY.
#
# This is free software, placed under the terms of the
# GNU Lesser General Public License, as published by the Free Software
# Foundation; either version 2.1 of the License, or (at your option) any
# later version. Please see the file LICENSE-LGPL for details.
#
# Web Page: http://mielke.cc/brltty/
#
# This software is maintained by Dave Mielke <dave@mielke.cc>.
###############################################################################

title Braille Memo

note The six horizontally-aligned round keys along the top are a braille keyboard.
note * From left to right, they are named: Dot3, Dot2, Dot1, Dot4, Dot5, Dot6.
note To the left of the Dot3 key are two vertically-aligned quarter-circle keys.
note * From top to bottom, they are named: Control, Alt.
note To the right of the Dot6 key are two vertically-aligned quarter-circle keys.
note * From top to bottom, they are named: Select, Read.
note Below the Dot1 and Dot4 keys are three horizontally-aligned round keys.
note * From left to right, they are named: Dot7, Chord, Dot8.
note At the bottom left is a group of four keys arranged in a cross.
note * Starting with the leftmost key and moving clockwise, they are named:
note * ArrowLeft, ArrowUp, ArrowRight, ArrowDown.
note A driver implementation constraint requires that some of the bindings
note * refer to the ArrowLeft and ArrowRight keys as PanLeft and PanRight.
note Some keys are entered by pressing a set of keys simultaneously:
note * Return: Dot7
note * Space: Dot8
note * ArrowUp: Chord + Dot1
note * ArrowDown: Chord + Dot4
note * ArrowLeft: Chord + Dot2
note * ArrowRight: Chord + Dot5
note * Backspace: Chord + Dot7
note * Delete: Chord + Dot8
note * Escape: Chord + ArrowUp (or: Chord + Dot7 + Dot8)
note * Info: Chord + ArrowDown (or: ArrowRight + Chord + Dot7 + Dot8)
note * Backward: ArrowRight + Chord + Dot1
note * Forward: ArrowRight + Chord + Dot4
note * ScrollLeft: ArrowRight + Chord + Dot2
note * ScrollRight: ArrowRight + Chord + Dot5
note * Insert: ArrowRight + Chord + Dot3
note * Change: ArrowRight + Chord + Dot6
note * OK: ArrowRight + Chord + Dot7
note * Set: ArrowRight + Chord + Dot8

####################
# Default Bindings #
####################

bind RoutingKey ROUTE
bind ArrowUp+ArrowDown CSRJMP_VERT
bind PanLeft+PanRight RETURN

bind PanLeft FWINLT
bind PanRight FWINRT
bind ArrowUp LNUP
bind ArrowDown LNDN

bind Control+PanLeft ATTRVIS
bind Control+PanRight CSRVIS
bind Control+ArrowUp CSRTRK
bind Control+ArrowDown SIXDOTS

bind Alt+PanLeft LNBEG
bind Alt+PanRight LNEND
bind Alt+ArrowUp TOP
bind Alt+ArrowDown BOT

bind Select+ArrowUp PRPROMPT
bind Select+ArrowDown NXPROMPT
bind Select+PanLeft PRPGRPH
bind Select+PanRight NXPGRPH

bind Read+ArrowUp PRDIFLN
bind Read+ArrowDown NXDIFLN
bind Read+PanLeft ATTRUP
bind Read+PanRight ATTRDN

bind Select+Read+ArrowUp PRSEARCH
bind Select+Read+ArrowDown NXSEARCH
bind Select+Read+PanLeft DISPMD
bind Select+Read+PanRight FREEZE

bind ArrowUp+ArrowLeft FWINLTSKIP
bind ArrowUp+ArrowRight FWINRTSKIP

bind ArrowDown+ArrowLeft CHRLT
bind ArrowDown+ArrowRight CHRRT

bind Control TIME
bind Alt INFO

bind Control+RoutingKey CLIP_NEW
bind Alt+RoutingKey CLIP_ADD
bind Select+RoutingKey COPY_LINE
bind Read+RoutingKey COPY_RECT
bind Control+Alt PASTE

bind Control+Alt+RoutingKey SETLEFT
bind Select+Read+RoutingKey DESCCHAR

map Dot1 DOT1
map Dot2 DOT2
map Dot3 DOT3
map Dot4 DOT4
map Dot5 DOT5
map Dot6 DOT6
map Dot7 DOT7
map Dot8 DOT8

map Control CONTROL
map Alt META

bind Dot7 KEY_ENTER
bind Dot8 PASSDOTS+space
bind Chord KEY_TAB

bind Insert KEY_INSERT
bind Delete KEY_DELETE
bind Backspace KEY_BACKSPACE

bind Backward KEY_HOME
bind Forward KEY_END

bind ScrollLeft KEY_PAGE_UP
bind ScrollRight KEY_PAGE_DOWN

bind ArrowLeft KEY_CURSOR_LEFT
bind ArrowRight KEY_CURSOR_RIGHT

bind Escape KEY_ESCAPE
bind Chord+RoutingKey KEY_FUNCTION

assign chord Read+
include brl-chords.kti


#################
# Menu Bindings #
#################

context menu

bind ArrowUp MENU_PREV_ITEM
bind ArrowDown MENU_NEXT_ITEM

bind Control MENU_PREV_SETTING
bind Alt MENU_NEXT_SETTING
bind Control+Alt MENU_PREV_LEVEL

bind Chord PREFMENU
bind Dot7 PREFLOAD
bind Dot8 PREFSAVE

