###############################################################################
# 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-2012 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>.
###############################################################################

# This key subtable is for Papenmeier displays which have switches.

hide on
hotkey LeftSwitchRear CONTEXT+1 NOOP
hotkey LeftSwitchFront CONTEXT+2 NOOP
hotkey RightSwitchRear CONTEXT+3 NOOP
hotkey RightSwitchFront CONTEXT+4 NOOP
hide off


context 1 LeftSwitchRear - Advanced Vertical Navigation

hide on
hotkey LeftSwitchRear NOOP CONTEXT+0
hotkey RightSwitchRear CONTEXT+5 NOOP
hotkey RightSwitchFront CONTEXT+6 NOOP
hide off

bind BarUp1 PRDIFLN
bind BarDown1 NXDIFLN
bind BarUp2 ATTRUP
bind BarDown2 ATTRDN
bind BarLeft1 PRPROMPT
bind BarRight1 NXPROMPT
bind BarLeft2 PRPGRPH
bind BarRight2 NXPGRPH

hide on
bind BarUp1+BarUp2 ATTRUP
bind BarDown1+BarDown2 ATTRDN
bind BarLeft1+BarLeft2 PRPGRPH
bind BarRight1+BarRight2 NXPGRPH
hide off


context 2 LeftSwitchFront - Specialized Navigation

hide on
hotkey LeftSwitchFront NOOP CONTEXT+0
hotkey RightSwitchRear CONTEXT+7 NOOP
hotkey RightSwitchFront CONTEXT+8 NOOP
hide off

bind BarUp1 PRSEARCH
bind BarDown1 NXSEARCH
bind BarUp2 HELP
bind BarDown2 LEARN
bind BarLeft1 CHRLT
bind BarRight1 CHRRT
bind BarLeft2 HWINLT
bind BarRight2 HWINRT

hide on
bind BarUp1+BarUp2 HELP
bind BarDown1+BarDown2 LEARN
bind BarLeft1+BarLeft2 HWINLT
bind BarRight1+BarRight2 HWINRT
hide off


context 3 RightSwitchRear - Content-based Navigation

hide on
hotkey RightSwitchRear NOOP CONTEXT+0
hotkey LeftSwitchRear CONTEXT+5 NOOP
hotkey LeftSwitchFront CONTEXT+7 NOOP
hide off

bind BarUp1 KEY_CURSOR_UP
bind BarDown1 KEY_CURSOR_DOWN
bind BarUp2 KEY_PAGE_UP
bind BarDown2 KEY_PAGE_DOWN
bind BarLeft1 FWINLT+route
bind BarRight1 FWINRT+route
bind BarLeft2 LNBEG+route
bind BarRight2 LNEND+route

hide on
bind BarUp1+BarUp2 KEY_PAGE_UP
bind BarDown1+BarDown2 KEY_PAGE_DOWN
bind BarLeft1+BarLeft2 LNBEG+route
bind BarRight1+BarRight2 LNEND+route
hide off


context 4 RightSwitchFront - Function Key Emulation

hide on
hotkey RightSwitchFront NOOP CONTEXT+0
hotkey LeftSwitchRear CONTEXT+6 NOOP
hotkey LeftSwitchFront CONTEXT+8 NOOP
hide off

bind BarUp1 KEY_CURSOR_UP
bind BarDown1 KEY_CURSOR_DOWN
bind BarUp2 KEY_PAGE_UP
bind BarDown2 KEY_PAGE_DOWN
bind BarLeft1 KEY_CURSOR_LEFT
bind BarRight1 KEY_CURSOR_RIGHT
bind BarLeft2 KEY_HOME
bind BarRight2 KEY_END

hide on
bind BarUp1+BarUp2 KEY_PAGE_UP
bind BarDown1+BarDown2 KEY_PAGE_DOWN
bind BarLeft1+BarLeft2 KEY_HOME
bind BarRight1+BarRight2 KEY_END
hide off


context 5 LeftSwitchRear+RightSwitchRear - Unused

hide on
hotkey LeftSwitchRear NOOP CONTEXT+3
hotkey RightSwitchRear NOOP CONTEXT+1
hide off


context 6 LeftSwitchRear+RightSwitchFront - Unused

hide on
hotkey LeftSwitchRear NOOP CONTEXT+4
hotkey RightSwitchFront NOOP CONTEXT+1
hide off


context 7 LeftSwitchFront+RightSwitchRear - Unused

hide on
hotkey LeftSwitchFront NOOP CONTEXT+3
hotkey RightSwitchRear NOOP CONTEXT+2
hide off


context 8 LeftSwitchFront+RightSwitchFront - Unused

hide on
hotkey LeftSwitchFront NOOP CONTEXT+4
hotkey RightSwitchRear NOOP CONTEXT+2
hide off


context menu

bind BarUp1 MENU_PREV_ITEM
bind BarDown1 MENU_NEXT_ITEM
bind BarUp2 MENU_FIRST_ITEM
bind BarDown2 MENU_LAST_ITEM
bind BarLeft1 MENU_PREV_SETTING
bind BarRight1 MENU_NEXT_SETTING
bind BarLeft2 PREFLOAD
bind BarRight2 PREFSAVE

hide on
bind BarUp1+BarUp2 MENU_FIRST_ITEM
bind BarDown1+BarDown2 MENU_LAST_ITEM
bind BarLeft1+BarLeft2 PREFLOAD
bind BarRight1+BarRight2 PREFSAVE
hide off


context default
