summaryrefslogtreecommitdiff
path: root/.config/sioyek/keys.config
blob: 0ddda9367f79ea500add15a19217009a21829c9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
# you can edit this file to change keybindings lines that start with '#' are comments
# the syntax is pretty simple. Some examples:
#command        k             (command is executed when k is pressed)
#command        <C-k>         (command is executed when k is pressed while holding control)
#command        K             (command is executed when K is entered, which is shift+k)
#command        <A-k>         (command is executed when k is pressed while holding alt)
#command        +             (command is executed when = is pressed while holding shift)
#command        <C-S-k>       (command is executed when k is pressed while holding control and shift)
#command        gg            (command is executed when g is pressed twice)
#command        gt            (command is executed when g is pressed and then t is pressed)
#command        g<C-n>Dt  (command is executed when g is pressed and then n is pressed while holding\
#                               control and then d is pressed while holding shift and then t is pressed)
# you can execute multiple commands using the following syntax:
#command1;command2;command3        <keybinding>
# for more information see the documentation at https://sioyek-documentation.readthedocs.io/


# ---------- NAVIGATION AND ZOOM ----------

# Goto the beginning of document. If prefixed with a number, it will go to that page.
# for example 150gg goes to page 150.
goto_beginning gg
goto_beginning <C-<home>>

# Goto the end of the document
goto_end <end>
goto_end G

# Opens a prompt to enter page number and jump to that page
goto_page_with_page_number r

## Goto left/right/bottom/top side of the page
#goto_left <unbound>
#goto_right <unbound>
#goto_top_of_page <unbound>
#goto_bottom_of_page <unbound>

# Goto left/right side of the page ignoring white margins
goto_left_smart ^
goto_right_smart $

# Goto the top-right side of page. Useful for two column documents
goto_top_of_page;goto_right_smart zz

# Movement (can be prefixed with a number)
# move_down           <down>
# move_up             <up>

move_left           <right>
move_right          <left>

# Goto forward for one page width. (can be prefixed with a number)
# (note that going forward for one page width is not usually what you want because if
# the page is larger than the screen you will miss some content. What you usually want is screen_down)
next_page u
previous_page i

# Go down one screen width (can be prefixed with a number which tells how many screen widths should we go down)
screen_down <space>
screen_up <S-<space>>
screen_down <pagedown>
screen_up <pageup>

# Goto the next/prev chapter
next_chapter gc
prev_chapter gC

# Goto previous viewing state and delete the current (and future) state(s).
# pop_state w

# Goto the previous history point
prev_state <backspace>
prev_state <C-<left>>

# Create a new sioyek window
new_window <C-t>

# Close the current sioyek window
close_window <C-w>

## Search and switch between sioyek windows
#goto_window <unbound>

# If we are not at the end of viewing history, goto the next history point
next_state <S-<backspace>>
next_state <C-<right>>

# Open table of contents.
goto_toc o

# Zoom
zoom_in  =
fit_to_page_width x
zoom_out -

## Zoom in/out on the mouse cursor (instead of center of screen)
# zoom_in_cursor <unbound>
# zoom_out_cursor <unbound>

# Rotate document
rotate_clockwise <unbound>
rotate_counterclockwise R

# Automatically set the zoom level and horizontal offset such that the current page is centered horizontally and
# it fills the screen width
fit_to_page_width <f9>
# Same as fit_to_page_with but ignores page margins
fit_to_page_width_smart <f10>

## Similar to fit_to_page_width, but for height
fit_to_page_height   z

## Similar to fit_to_page_width_smart but for height
#fit_to_page_height_smart   <unbound>

## Same as fit_to_page_width_smart, but instead of filling the screen width, it fills the ratio of screen that is
## configured in `prefs_user.config` using `fit_to_page_width_ratio` config. See https://github.com/ahrm/sioyek/issues/162#issuecomment-1059738730.
#fit_to_page_width_ratio <unbound>

# Open a file dialog to select a document.
open_document t
# Open an embedded file dialog in sioyek
open_document_embedded <C-o>
# Open an embedded file dialog in sioyek rooted in the directory of current opened file
open_document_embedded_from_current_path <C-S-o>

# Open a searchable list of previously opened documents.
open_prev_doc a

## Opens the last document opened is sioyek. It is useful when you want to quickly toggle between two documents
open_last_document e

## Keyboard shortcut to enter visual mark mode (instead of right clicking)
#enter_visual_mark_mode <unbound>

# Command the move the visual mark to the next/previous line
# these keys only work when a visual mark is set (by right clicking or using `visual_mark_under_cursor` command)
move_visual_mark_up k
move_visual_mark_down j
move_visual_mark_up <up>
move_visual_mark_down <down>

## lock horizontal scroll, useful when using laptop touchpads
# toggle_horizontal_scroll_lock <unbound>

# ---------- SEARCH ----------

# Search the document.
# example: /something                   (searches the document for 'something')
# you can also specify a page range to search:
# example: /<110,135>something          (searches pages 110 to 135 (inclusive) for 'something')
search <C-f>
search /

# Searches the current chapter. This is essentially the same as search but the range prefix is autofilled
# with the range of the current lowest level subchapter.
chapter_search c<C-f>
chapter_search c/

# Goto the next search item. Can be prefixed with a number which is the same as performing the command n times
# for example if we are on the 10th search result and we input 15n, we go to the 25th search result.
next_item n
# Goto the previous search result. Can be prefixed with a number with similar rules as next_item.
previous_item N

# ---------- BOOKMARKS ----------
# Add a bookmark in the current location (opens a text input where you can specify the bookmark text)
add_bookmark b
delete_bookmark db

# Open bookmarks menu of the current document.
goto_bookmark gb

# Open bookmarks menu of all documents.
goto_bookmark_g gB

# ---------- HIGHLIGHTS ----------
# You can select a piece of text and press the `add_highlight` shortcut followed by a symbol (a character from a-z) to highlight
# the text
add_highlight h
# Goto highlights of current document
goto_highlight gh
# Goto highlights of all documents
goto_highlight_g gH
# Left click on a highlight and then press the `delete_highlight` shortcut to delete it.
delete_highlight dh

# Sets the highlight type to be used for other operations (the default highlight type is 'a')
#set_select_highlight_type

## Same as `add_highlight` but uses the current selected highlight type as the type of highlight
#add_highlight_with_current_type <unbound>

## Toggle select highlight mode. In select highlight mode, all text selected using mouse will automatically be highlighted
## with highlight type set using `set_select_highlight_type`
#toggle_select_highlight <unbound>

# Goto next/previous highlight in current document
goto_next_highlight gnh
goto_prev_highlight gNh

## Goto next/previous highlight of the current selected highlight type
#goto_next_highlight_of_type <unbound>
#goto_prev_highlight_of_type <unbound>

# ---------- MARKS ----------

# Mark the current location. After pressing the mark button, you must enter a symbol (a letter from a-z or A-Z).
# this marks the current location in the file with the entered symbol. Afterwards you will be able to return to
# the locations of the marks using goto_mark command.
# example:  mm      (marks the current location in the file with a mark named 'm')
set_mark m
# Goto a previously set mark. After pressing goto_mark you must enter a symbol associated with a previously set mark.
# example:  `m      (goes to the location of the mark named m)
goto_mark `

# ---------- PORTALS ----------
# If we are in default state, goto portal state with the current location in document as the portal source
# if we are already in the portal state, create the portal with the current location as destination.
portal p

# Delete the portal with the closest source to current location
delete_portal dp

# Goto the position of the portal with the closest source to current location
goto_portal gp
goto_portal <tab>

# Similar to goto_portal, except when prev_state is called, the destination of the portal is update to be the state
# on which prev_state is called
edit_portal P
edit_portal <S-<tab>>

# Open/Close the helper window for portals
toggle_window_configuration <f12>

## open/close helper window
#toggle_one_window <unbound>

# ---------- MISC ----------

# Copy selected text
copy <C-c>

toggle_fullscreen <f11>

# Toggles whether we highlight pdf links or not
toggle_highlight <f1>

# open command line
command :

# Search the selected text using one of the search engines defined using search_url_* settings in prefs.config (* can be any letter between 'a' and 'z')
# see https://sioyek-documentation.readthedocs.io/en/latest/usage.html#external-search
external_search s

# opens the selected text as a url in the default browser
# open_selected_url Q

# Toggle dark mode (inverted colors)
toggle_dark_mode c

## Toggle custom color mode. You can specify the text background color in your `prefs_user.config` file
## see https://sioyek-documentation.readthedocs.io/en/latest/configuration.html#custom-background-color-and-custom-text-color
#toggle_custom_color <f8>

# Toggle synctex mode. When in synctex mode, right clicking on a pdf launches the corresponding latex page.
toggle_synctex <f4>

## Perform a synctex search under the mouse cursor
#synctex_under_cursor <unbound>

# While in mouse drag mode, instead of selecting text you can pan the screen using mouse
toggle_mouse_drag_mode <f6>

# In visual scroll mode, mouse wheel performs `move_visual_mark_up` and `move_visual_mark_down` commands
toggle_visual_scroll <f7>

# In visual scroll mode, create an overview to/go to/portal to the definition in highlighted line
overview_definition l
goto_definition <C-]>
portal_to_definition ]

# In presentation mode, we fit the pages to screen and movement keys move entire pages
toggle_presentation_mode <f5>

## Quit sioyek
quit q

# Open PDF links using keyboard
open_link f

# Select text using keyboard
keyboard_select v

# Smart jump using keyboard
keyboard_smart_jump F

## Open overview window using keyboard
#keyboard_overview <unbound>

## If the preview is not correct, jump to the next preview
#next_preview <C-n>

## If the preview is not correct, jump to the previous preview
#previous_preview <C-N>

## Jump to the location of the current overview
#goto_overview <unbound>

## Create a portal to the location of the current overview
#portal_to_overview <unbound>

## Center the window on selected text
#goto_selected_text <unbound>

## Focus the visual mark on the text matching the given string (useful when extensions want to focus on a text)
#focus_text <unbound>

## Smart jump to the location under mouse cursor
#smart_jump_under_cursor <unbound>
## Open overview window to the location under mouse cursor
#overview_under_cursor <unbound>
## Set a visual mark under mouse cursor
#visual_mark_under_cursor <unbound>
## Close the overview window
#close_overview <unbound>
## Exit visual mark mode
#close_visual_mark <unbound>

## Import sioyek data from an exported file
#import <unbound>

## Export sioyek data into a json file
#export <unbound>

## Execute shell commands. For example:
## sioyek --new-instance %1
## in the command %1 expands to the path of the current file and %2 expand to the file name of the current file
#execute <unbound>

## (deprecated see bottom of the page) Execute a predefined command. these commands are defined in `prefs_user.config` file using the following syntax:
## --------prefs_user.config-----------
## execute_command_a	some_command %1 %2
## execute_command_x	another_command %2
## ------------------------------------
## now in order to execute the second command you can first execute `execute_predefined_command` and then press 'x'
#execute_predefined_command <unbound>

## Embed the annotations (highlights and bookmarks) into a new PDF file so they are visible to other PDF readers
#embed_annotations <unbound>

## Copy the current window configuration to clipboard so they can be used in `prefs_user.config`
#copy_window_size_config <unbound>

## Opens the default preference file
#prefs <unbound>
## Opens the user preference file with highest priority
#prefs_user <unbound>
## Opens a list of all user preference files
#prefs_user_all <unbound>

## Opens the default kwys file
#keys <unbound>
## Opens the user keys file with highest priority
#keys_user <unbound>
## Opens a list of all user keys files
#keys_user_all <unbound>

## Enter password for password protected documents
#enter_password <unbound>

## Toggle fastread mode. this is an experiental feature
#toggle_fastread <unbound>

## Toggle statusbar display
#toggle_statusbar <unbound>

## Reload sioyek window
#reload <unbound>

## Set the status string to be displayed in sioyek's statusbar (it is useful for extensions)
#set_status_string <unbound>

## Clears the status string set by `set_status_string`
#clear_status_string <unbound>

## Toggles the window titlebar
toggle_titlebar <C-w>

## You can bind custom commands defined in `prefs_user.config` using the same syntax as the built-in commands
## --------prefs_user.config-----------
## new_command	_my_command_name python /path/to/script.py %{file_name} %{paper_name}
## ------------------------------------
## now you can bind _my_command_name to a keybind here:
#_my_command_name <unbound>