qtpy: make git-cola pyside-compatible
[git-cola.git] / cola / hotkeys.py
blob75befaf6d15be56c2ed5ba8e56d38b6f35a637ed
1 from __future__ import absolute_import
3 from qtpy.QtGui import QKeySequence
4 from qtpy.QtCore import Qt
6 # A-G
7 STAGE_MODIFIED = QKeySequence(Qt.ALT + Qt.Key_A)
8 WORD_LEFT = QKeySequence(Qt.Key_B)
9 BLAME = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_B)
10 BRANCH = QKeySequence(Qt.CTRL + Qt.Key_B)
11 CHECKOUT = QKeySequence(Qt.ALT + Qt.Key_B)
12 CHERRY_PICK = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_C)
13 DIFFSTAT = QKeySequence(Qt.ALT + Qt.Key_D)
14 DIFF = QKeySequence(Qt.CTRL + Qt.Key_D)
15 DIFF_SECONDARY = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_D)
16 EDIT = QKeySequence(Qt.CTRL + Qt.Key_E)
17 EDIT_SECONDARY = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_E)
18 EXPORT = QKeySequence(Qt.ALT + Qt.Key_E)
19 FIT = QKeySequence(Qt.Key_F)
20 FETCH = QKeySequence(Qt.CTRL + Qt.Key_F)
21 FILTER = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_F)
22 GREP = QKeySequence(Qt.CTRL + Qt.Key_G)
23 # H-P
24 MOVE_LEFT = QKeySequence(Qt.Key_H)
25 MOVE_LEFT_SHIFT = QKeySequence(Qt.SHIFT + Qt.Key_H)
26 HISTORY = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_H)
27 SIGNOFF = QKeySequence(Qt.CTRL + Qt.Key_I)
28 MOVE_DOWN = QKeySequence(Qt.Key_J)
29 MOVE_DOWN_SHIFT = QKeySequence(Qt.SHIFT + Qt.Key_J)
30 MOVE_DOWN_SECONDARY = QKeySequence(Qt.ALT + Qt.Key_J)
31 MOVE_DOWN_TERTIARY = QKeySequence(Qt.SHIFT + Qt.Key_J)
32 MOVE_UP = QKeySequence(Qt.Key_K)
33 MOVE_UP_SHIFT = QKeySequence(Qt.SHIFT + Qt.Key_K)
34 MOVE_UP_SECONDARY = QKeySequence(Qt.ALT + Qt.Key_K)
35 MOVE_UP_TERTIARY = QKeySequence(Qt.SHIFT + Qt.Key_K)
36 MOVE_RIGHT = QKeySequence(Qt.Key_L)
37 MOVE_RIGHT_SHIFT = QKeySequence(Qt.SHIFT + Qt.Key_L)
38 FOCUS = QKeySequence(Qt.CTRL + Qt.Key_L)
39 FOCUS_STATUS = QKeySequence(Qt.CTRL + Qt.Key_K)
40 AMEND = QKeySequence(Qt.CTRL + Qt.Key_M)
41 MERGE = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_M)
42 PUSH = QKeySequence(Qt.CTRL + Qt.Key_P)
43 PULL = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_P)
44 # Q-Z
45 QUIT = QKeySequence(Qt.CTRL + Qt.Key_Q)
46 REFRESH = QKeySequence(Qt.CTRL + Qt.Key_R)
47 REFRESH_SECONDARY = QKeySequence(Qt.Key_F5)
48 REFRESH_HOTKEYS = (REFRESH, REFRESH_SECONDARY)
49 STAGE_DIFF = QKeySequence(Qt.Key_S)
50 STAGE_SELECTION = QKeySequence(Qt.CTRL + Qt.Key_S)
51 STASH = QKeySequence(Qt.ALT + Qt.SHIFT + Qt.Key_S)
52 FINDER = QKeySequence(Qt.CTRL + Qt.Key_T)
53 FINDER_SECONDARY = QKeySequence(Qt.Key_T)
54 TERMINAL = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_T)
55 STAGE_UNTRACKED = QKeySequence(Qt.ALT + Qt.Key_U)
56 REVERT = QKeySequence(Qt.CTRL + Qt.Key_U)
57 WORD_RIGHT = QKeySequence(Qt.Key_W)
58 UNDO = QKeySequence(Qt.CTRL + Qt.Key_Z)
60 # Numbers
61 START_OF_LINE = QKeySequence(Qt.Key_0)
63 # Special keys
64 BACKSPACE = QKeySequence(Qt.Key_Backspace)
65 TRASH = QKeySequence(Qt.CTRL + Qt.Key_Backspace)
66 DELETE_FILE = QKeySequence(Qt.CTRL + Qt.SHIFT + Qt.Key_Backspace)
67 DELETE_FILE_SECONDARY = QKeySequence(Qt.CTRL + Qt.Key_Backspace)
68 PREFERENCES = QKeySequence(Qt.CTRL + Qt.Key_Comma)
69 END_OF_LINE = QKeySequence(Qt.Key_Dollar)
70 DOWN = QKeySequence(Qt.Key_Down)
71 ENTER = QKeySequence(Qt.Key_Enter)
72 ZOOM_OUT = QKeySequence(Qt.Key_Minus)
73 REMOVE_ITEM = QKeySequence(Qt.Key_Minus)
74 ADD_ITEM = QKeySequence(Qt.Key_Plus)
75 ZOOM_IN = QKeySequence(Qt.Key_Plus)
76 ZOOM_IN_SECONDARY = QKeySequence(Qt.Key_Equal)
78 QUESTION = QKeySequence(Qt.Key_Question)
79 RETURN = QKeySequence(Qt.Key_Return)
80 ACCEPT = (ENTER, RETURN)
81 COMMIT = QKeySequence(Qt.CTRL + Qt.Key_Return)
82 PRIMARY_ACTION = QKeySequence(QKeySequence(Qt.Key_Space))
83 SECONDARY_ACTION = QKeySequence(Qt.SHIFT + Qt.Key_Space)
84 LEAVE = QKeySequence(Qt.SHIFT + Qt.Key_Tab)
85 UP = QKeySequence(Qt.Key_Up)
87 CTRL_RETURN = QKeySequence(Qt.CTRL + Qt.Key_Return)
88 CTRL_ENTER = QKeySequence(Qt.CTRL + Qt.Key_Enter)
90 # Rebase
91 REBASE_PICK = (QKeySequence(Qt.Key_1), QKeySequence(Qt.Key_P))
92 REBASE_REWORD = (QKeySequence(Qt.Key_2), QKeySequence(Qt.Key_R))
93 REBASE_EDIT = (QKeySequence(Qt.Key_3), QKeySequence(Qt.Key_E))
94 REBASE_FIXUP = (QKeySequence(Qt.Key_4), QKeySequence(Qt.Key_F))
95 REBASE_SQUASH = (QKeySequence(Qt.Key_5), QKeySequence(Qt.Key_S))
97 # Key Sequences
98 COPY = QKeySequence.Copy
99 CLOSE = QKeySequence.Close
100 CUT = QKeySequence.Cut
101 DELETE = QKeySequence.Delete
102 NEW = QKeySequence.New
103 OPEN = QKeySequence.Open