###############################################################################
# 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-2021 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://brltty.app/
#
# This software is maintained by Dave Mielke <dave@mielke.cc>.
###############################################################################

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 \{space} SPACE
assign chord \{space}+
include ../chords.kti

bind \{press} RETURN
bind Up LNUP
bind Down LNDN
bind Left FWINLT
bind Right FWINRT

bind Dot4+\{press} HELP
bind Dot4+Up TOP
bind Dot4+Down BOT
bind Dot4+Left LNBEG
bind Dot4+Right LNEND

bind Dot5+\{press} INFO
bind Dot5+Up PRDIFLN
bind Dot5+Down NXDIFLN
bind Dot5+Left FWINLTSKIP
bind Dot5+Right FWINRTSKIP

bind Dot6+\{press} LEARN
bind Dot6+Up ATTRUP
bind Dot6+Down ATTRDN
bind Dot6+Left CHRLT
bind Dot6+Right CHRRT

Bind Dot4+Dot6+\{press} CSRJMP_VERT
Bind Dot4+Dot6+Up PRPGRPH
Bind Dot4+Dot6+Down NXPGRPH
Bind Dot4+Dot6+Left PRPROMPT
Bind Dot4+Dot6+Right NXPROMPT

Bind Dot4+Dot5+Dot6+\{press} PREFMENU
Bind Dot4+Dot5+Dot6+Up PREFLOAD
Bind Dot4+Dot5+Dot6+Down PREFSAVE
Bind Dot4+Dot5+Dot6+Left PRSEARCH
Bind Dot4+Dot5+Dot6+Right NXSEARCH

Bind Dot4+Dot5+\{press} SIXDOTS
Bind Dot4+Dot5+Up FREEZE
Bind Dot4+Dot5+Down DISPMD
Bind Dot4+Dot5+Left SWITCHVT_PREV
Bind Dot4+Dot5+Right SWITCHVT_NEXT

Bind Dot5+Dot6+\{press} CSRTRK
Bind Dot5+Dot6+Up TIME
Bind Dot5+Dot6+Down SLIDEWIN
Bind Dot5+Dot6+Left SKPIDLNS
Bind Dot5+Dot6+Right SKPBLNKWINS

bind Dot1+\{press} KEY_TAB
bind Dot1+Up KEY_CURSOR_UP
bind Dot1+Down KEY_CURSOR_DOWN
bind Dot1+Left KEY_CURSOR_LEFT
bind Dot1+Right KEY_CURSOR_RIGHT

bind Dot2+\{press} KEY_ENTER
bind Dot2+Up KEY_INSERT
bind Dot2+Down PASTE
bind Dot2+Left KEY_BACKSPACE
bind Dot2+Right KEY_DELETE

bind Dot3+\{press} KEY_ESCAPE
bind Dot3+Up KEY_PAGE_UP
bind Dot3+Down KEY_PAGE_DOWN
bind Dot3+Left KEY_HOME
bind Dot3+Right KEY_END

ifKey B9
bind B9+\{press} AUTOSPEAK
bind B9+Up SAY_LOUDER
bind B9+Down SAY_SOFTER
bind B9+Left SAY_SLOWER
bind B9+Right SAY_FASTER
endIf

ifKey B10
bind B10+\{press} SPKHOME
bind B10+Up SAY_ABOVE
bind B10+Down SAY_BELOW
bind B10+Left MUTE
bind B10+Right SAY_LINE
endIf

ifKey RoutingKey
bind \{space}+RoutingKey KEY_FUNCTION
bind \{space}+RoutingKey+!RoutingKey CLIP_APPEND

bind RoutingKey+\{press} DESCCHAR
bind RoutingKey+Left CLIP_NEW
bind RoutingKey+Up CLIP_ADD
bind RoutingKey+Right COPY_LINE
bind RoutingKey+Down COPY_RECT
endIf


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

context menu

bind \{press} PREFMENU
bind Up MENU_PREV_ITEM
bind Down MENU_NEXT_ITEM
bind Left MENU_PREV_SETTING
bind Right MENU_NEXT_SETTING

bind \{space} MENU_PREV_LEVEL
bind \{space}+\{press} PREFSAVE
bind \{space}+Up MENU_FIRST_ITEM
bind \{space}+Down MENU_LAST_ITEM
bind \{space}+Left FWINLT
bind \{space}+Right FWINRT

context default
