#===========================================================
# CoolReader3
# Key to Command map file
#
# all identifiers should be declared in keydefs.ini
#===========================================================

#main viewer window, commands possible to use in override

[main-override-commands]

#main viewer window, keys possible to override
[main-override-keys]


# key translation map for different screen orientations
#[key-substitution-90]
#[key-substitution-180]
#[key-substitution-270]

# main viewer window
[main]
# possible actions (not all of them will work for PB):
# MCMD_QUIT
# MCMD_MAIN_MENU
# MCMD_SETTINGS_FONTSIZE
# MCMD_SETTINGS_ORIENTATION
# MCMD_SETTINGS
# MCMD_RECENT_BOOK_LIST
# MCMD_OPEN_RECENT_BOOK
# MCMD_SWITCH_TO_RECENT_BOOK
# MCMD_ABOUT
# MCMD_CITE
# MCMD_HELP
# document scope commands DCMD...
KEY_BACK = MCMD_QUIT
KEY_LEFT = DCMD_PAGEUP
#KEY_LEFT = PB_CMD_UPDATE_WINDOW
KEY_PREV = DCMD_PAGEUP
KEY_PREV, LONG = PB_CMD_PAGEUP_REPEAT, 10
KEY_RIGHT = DCMD_PAGEDOWN
KEY_NEXT = DCMD_PAGEDOWN
KEY_NEXT, LONG = PB_CMD_PAGEDOWN_REPEAT, 10
KEY_OK = PB_QUICK_MENU
KEY_HOME = MCMD_MAIN_MENU
KEY_OK, LONG = MCMD_MAIN_MENU
KEY_UP = DCMD_ZOOM_IN
KEY_DOWN = DCMD_ZOOM_OUT
KEY_PREV, LONG = MCMD_QUIT

[menu]
KEY_BACK = MCMD_OK
KEY_BACK, LONG = MCMD_CANCEL
KEY_OK = MCMD_SELECT
KEY_OK, LONG = MCMD_SELECT_LONG
KEY_DOWN = MCMD_NEXT_ITEM
KEY_UP = MCMD_PREV_ITEM
KEY_RIGHT = MCMD_NEXT_PAGE
KEY_LEFT = MCMD_PREV_PAGE
KEY_NEXT = MCMD_PREV_ITEM
KEY_PREV = MCMD_NEXT_ITEM
KEY_NEXT2 = MCMD_PREV_PAGE
KEY_PREV2 = MCMD_NEXT_PAGE

[menu10]
KEY_BACK = MCMD_CANCEL
KEY_OK = MCMD_OK
KEY_UP = MCMD_SELECT_1
KEY_RIGHT = MCMD_SELECT_2
KEY_DOWN = MCMD_SELECT_3
KEY_LEFT = MCMD_SELECT_4
KEY_UP, LONG = MCMD_SELECT_5
KEY_RIGHT, LONG = MCMD_SELECT_6
KEY_DOWN, LONG = MCMD_SELECT_7
KEY_LEFT, LONG = MCMD_SELECT_8
KEY_HOME = MCMD_SELECT_9
KEY_HOME, LONG = MCMD_SELECT_0
KEY_NEXT = MCMD_SCROLL_FORWARD
KEY_PREV = MCMD_SCROLL_BACK
KEY_NEXT, LONG = MCMD_SCROLL_FORWARD_LONG
KEY_PREV, LONG = MCMD_SCROLL_BACK_LONG

[cite]
KEY_BACK = MCMD_CANCEL
KEY_OK = MCMD_OK
KEY_OK, LONG = MCMD_CANCEL
KEY_NEXT = MCMD_SCROLL_BACK
KEY_PREV = MCMD_SCROLL_FORWARD
KEY_UP = MCMD_SCROLL_BACK
KEY_DOWN = MCMD_SCROLL_FORWARD
KEY_RIGHT = PB_CMD_RIGHT
KEY_LEFT = PB_CMD_LEFT
KEY_NEXT, LONG = MCMD_SCROLL_BACK_LONG
KEY_PREV, LONG = MCMD_SCROLL_FORWARD_LONG

[dialog]
KEY_BACK = MCMD_CANCEL
KEY_OK = MCMD_OK
KEY_NEXT = MCMD_SCROLL_BACK
KEY_PREV = MCMD_SCROLL_FORWARD
KEY_UP = MCMD_SCROLL_BACK
KEY_DOWN = MCMD_SCROLL_FORWARD
KEY_RIGHT = MCMD_SCROLL_FORWARD
KEY_LEFT = MCMD_SCROLL_BACK
KEY_NEXT, LONG = MCMD_SCROLL_BACK_LONG
KEY_PREV, LONG = MCMD_SCROLL_FORWARD_LONG

[vkeyboard]
KEY_BACK = MCMD_CANCEL
KEY_OK = MCMD_OK

[txkeyboard]
KEY_BACK = MCMD_CANCEL
KEY_OK = MCMD_OK
KEY_NEXT = MCMD_SCROLL_BACK
KEY_PREV = MCMD_SCROLL_FORWARD

# custom document view dialog
[browse]
KEY_BACK = MCMD_CANCEL
KEY_OK = MCMD_OK
KEY_RIGHT = DCMD_PAGEDOWN
KEY_LEFT = DCMD_PAGEUP
KEY_NEXT = DCMD_PAGEDOWN 
KEY_PREV = DCMD_PAGEUP
KEY_UP = DCMD_ZOOM_IN 
KEY_DOWN = DCMD_ZOOM_OUT
 
[bookmarks]
KEY_BACK = MCMD_CANCEL
KEY_OK = MCMD_SELECT
KEY_OK, LONG = MCMD_SELECT_LONG
KEY_HOME = MCMD_SELECT_LONG
KEY_DOWN = MCMD_NEXT_ITEM
KEY_UP = MCMD_PREV_ITEM
KEY_RIGHT = MCMD_NEXT_PAGE
KEY_LEFT = MCMD_PREV_PAGE
KEY_NEXT = MCMD_NEXT_MODE
KEY_PREV = MCMD_PREV_MODE
KEY_NEXT2 = MCMD_PREV_PAGE
KEY_PREV2 = MCMD_NEXT_PAGE
KEY_DELETE = PB_CMD_BOOKMARK_REMOVE

# this is Main Menu definition
# place items for main menu here
# left side will be ignored
[mainMenuItems]
1 = PB_CMD_MAIN_MENU
2 = MCMD_ABOUT
3 = MCMD_RECENT_BOOK_LIST
4 = MCMD_CITES_LIST
5 = MCMD_CITE
6 = DCMD_SAVE_HISTORY
7 = DCMD_SAVE_TO_CACHE
8 = MCMD_HELP
9 = MCMD_HELP_KEYS


[txkeyboard]
KEY_BACK = MCMD_CANCEL
KEY_OK = MCMD_OK
KEY_UP = PB_CMD_UP
KEY_DOWN = PB_CMD_DOWN
KEY_LEFT = PB_CMD_LEFT
KEY_RIGHT = PB_CMD_RIGHT

[dict]
KEY_BACK = MCMD_CANCEL
KEY_OK = MCMD_OK
KEY_LEFT = PB_CMD_LEFT
KEY_RIGHT = PB_CMD_RIGHT
KEY_UP = PB_CMD_UP
KEY_DOWN = PB_CMD_DOWN
KEY_NEXT = DCMD_PAGEDOWN
KEY_PREV = DCMD_PAGEUP
KEY_NEXT, LONG = DCMD_PAGEDOWN, 10
KEY_PREV, LONG = DCMD_PAGEUP, 10
KEY_LEFT, LONG = PB_CMD_LEFT 
KEY_RIGHT, LONG = PB_CMD_RIGHT 
KEY_UP, LONG = PB_CMD_UP, 5
KEY_DOWN, LONG = PB_CMD_DOWN, 5
 
