|
|
@ -1,35 +1,35 @@ |
|
|
|
import * as actions from '../shared/actions'; |
|
|
|
import * as actions from '../shared/actions'; |
|
|
|
|
|
|
|
|
|
|
|
const DEFAULT_KEYMAP = { |
|
|
|
const DEFAULT_KEYMAP = { |
|
|
|
':': [ actions.CMD_OPEN ], |
|
|
|
':': { type: actions.CMD_OPEN }, |
|
|
|
'o': [ actions.CMD_TABS_OPEN, false ], |
|
|
|
'o': { type: actions.CMD_TABS_OPEN, alter: false }, |
|
|
|
'O': [ actions.CMD_TABS_OPEN, true ], |
|
|
|
'O': { type: actions.CMD_TABS_OPEN, alter: true }, |
|
|
|
'b': [ actions.CMD_BUFFER ], |
|
|
|
'b': { type: actions.CMD_BUFFER }, |
|
|
|
'k': [ actions.SCROLL_LINES, -1 ], |
|
|
|
'k': { type: actions.SCROLL_LINES, count: -1 }, |
|
|
|
'j': [ actions.SCROLL_LINES, 1 ], |
|
|
|
'j': { type: actions.SCROLL_LINES, count: 1 }, |
|
|
|
'<C-E>': [ actions.SCROLL_LINES, -1 ], |
|
|
|
'<C-E>': { type: actions.SCROLL_LINES, count: -1 }, |
|
|
|
'<C-Y>': [ actions.SCROLL_LINES, 1 ], |
|
|
|
'<C-Y>': { type: actions.SCROLL_LINES, count: 1 }, |
|
|
|
'<C-U>': [ actions.SCROLL_PAGES, -0.5 ], |
|
|
|
'<C-U>': { type: actions.SCROLL_PAGES, count: -0.5 }, |
|
|
|
'<C-D>': [ actions.SCROLL_PAGES, 0.5 ], |
|
|
|
'<C-D>': { type: actions.SCROLL_PAGES, count: 0.5 }, |
|
|
|
'<C-B>': [ actions.SCROLL_PAGES, -1 ], |
|
|
|
'<C-B>': { type: actions.SCROLL_PAGES, count: -1 }, |
|
|
|
'<C-F>': [ actions.SCROLL_PAGES, 1 ], |
|
|
|
'<C-F>': { type: actions.SCROLL_PAGES, count: 1 }, |
|
|
|
'gg': [ actions.SCROLL_TOP ], |
|
|
|
'gg': { type: actions.SCROLL_TOP }, |
|
|
|
'G': [ actions.SCROLL_BOTTOM ], |
|
|
|
'G': { type: actions.SCROLL_BOTTOM }, |
|
|
|
'0': [ actions.SCROLL_LEFT ], |
|
|
|
'0': { type: actions.SCROLL_LEFT }, |
|
|
|
'$': [ actions.SCROLL_RIGHT ], |
|
|
|
'$': { type: actions.SCROLL_RIGHT }, |
|
|
|
'd': [ actions.TABS_CLOSE ], |
|
|
|
'd': { type: actions.TABS_CLOSE }, |
|
|
|
'u': [ actions.TABS_REOPEN], |
|
|
|
'u': { type: actions.TABS_REOPEN }, |
|
|
|
'h': [ actions.TABS_PREV, 1 ], |
|
|
|
'h': { type: actions.TABS_PREV, count: 1 }, |
|
|
|
'l': [ actions.TABS_NEXT, 1 ], |
|
|
|
'l': { type: actions.TABS_NEXT, count: 1 }, |
|
|
|
'r': [ actions.TABS_RELOAD, false ], |
|
|
|
'r': { type: actions.TABS_RELOAD, cache: false }, |
|
|
|
'R': [ actions.TABS_RELOAD, true ], |
|
|
|
'R': { type: actions.TABS_RELOAD, cache: true }, |
|
|
|
'zi': [ actions.ZOOM_IN ], |
|
|
|
'zi': { type: actions.ZOOM_IN }, |
|
|
|
'zo': [ actions.ZOOM_OUT ], |
|
|
|
'zo': { type: actions.ZOOM_OUT }, |
|
|
|
'zz': [ actions.ZOOM_NEUTRAL], |
|
|
|
'zz': { type: actions.ZOOM_NEUTRAL }, |
|
|
|
'f': [ actions.FOLLOW_START, false ], |
|
|
|
'f': { type: actions.FOLLOW_START, newTab: false }, |
|
|
|
'F': [ actions.FOLLOW_START, true ], |
|
|
|
'F': { type: actions.FOLLOW_START, newTab: true }, |
|
|
|
'H': [ actions.HISTORY_PREV ], |
|
|
|
'H': { type: actions.HISTORY_PREV }, |
|
|
|
'L': [ actions.HISTORY_NEXT ], |
|
|
|
'L': { type: actions.HISTORY_NEXT }, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
export default class KeyQueue { |
|
|
|
export default class KeyQueue { |
|
|
|