add visualizer_sample_multiplier config option
[ncmpcpp.git] / doc / bindings
blobe623b53d2c297bde4322f8ca0f87431ce901ac67
1 ##########################################################
2 ## this is example bindings configuration file, copy it ##
3 ## to ~/.ncmpcpp/bindings and set up your preferences   ##
4 ##########################################################
5 ##
6 ##### General rules #####
7 ##
8 ## 1) Because each action has runtime checks whether it's
9 ##    ok to run it, a few actions can be bound to one key.
10 ##    Actions will be bound in order given in configuration
11 ##    file. When a key is pressed, first action in order
12 ##    will test itself whether it's possible to run it. If
13 ##    test succeeds, action is executed and other actions
14 ##    bound to this key are ignored. If it doesn't, next
15 ##    action in order tests itself etc.
17 ## 2) It's possible to bind more that one action at once
18 ##    to a key. It can be done using the following syntax:
20 ##    def_key "key"
21 ##      action1
22 ##      action2
23 ##      ...
25 ##    This creates a chain of actions. When such chain is
26 ##    executed, each action in chain is run until the end of
27 ##    chain is reached or one of its actions fails to execute
28 ##    due to its requirements not being met. If multiple actions
29 ##    and/or chains are bound to the same key, they will be
30 ##    consecutively run until one of them gets fully executed.
32 ## 3) When ncmpcpp starts, bindings configuration file is
33 ##    parsed and then ncmpcpp provides "missing pieces"
34 ##    of default keybindings. If you want to disable some
35 ##    bindings, there is a special action called 'dummy'
36 ##    for that purpose. Eg. if you want to disable ability
37 ##    to crop playlists, you need to put the following
38 ##    into configuration file:
40 ##    def_key "C"
41 ##      dummy
43 ##    After that ncmpcpp will not bind any default action
44 ##    to this key.
46 ## 4) To let you write simple macros, the following special
47 ##    actions are provided:
49 ##    - push_character "character" - pushes given special
50 ##      character into input queue, so it will be immediately
51 ##      picked by ncmpcpp upon next call to readKey function.
52 ##      Accepted values: mouse, up, down, page_up, page_down,
53 ##      home, end, space, enter, insert, delete, left, right,
54 ##      tab, shift_tab, ctrl_a, ctrl_b, ..., ctrl_z, f1, f2,
55 ##      ..., f12, backspace, backspace_2.
57 ##    - push_characters "string" - pushes given string into
58 ##      input queue.
60 ##    - require_runnable "action" - checks whether given action
61 ##      is runnable and fails if it isn't. This is especially
62 ##      useful when mixed with previous two functions. Consider
63 ##      the following macro definition:
65 ##      def_key "key"
66 ##        push_characters "custom_filter"
67 ##        apply_filter
69 ##      If apply_filter can't be currently run, we end up with
70 ##      sequence of characters in input queue which will be
71 ##      treated just as we typed them. This may lead to unexpected
72 ##      results (in this case 'c' will most likely clear current
73 ##      playlist, 'u' will trigger database update, 's' will stop
74 ##      playback etc.). To prevent such thing from happening, we
75 ##      need to change above definition to this one:
77 ##      def_key "key"
78 ##        require_runnable "apply_filter"
79 ##        push_characters "custom_filter"
80 ##        apply_filter
82 ##      Here, first we test whether apply_filter can be actually run
83 ##      before we stuff characters into input queue, so if condition
84 ##      is not met, whole chain is aborted and we're fine.
86 ##    - require_screen "screen" - checks whether given screen is
87 ##      currently active. accepted values: browser, clock, help,
88 ##      media_library, outputs, playlist, playlist_editor,
89 ##      search_engine, tag_editor, visualizer, last_fm, lyrics,
90 ##      selected_items_adder, server_info, song_info,
91 ##      sort_playlist_dialog, tiny_tag_editor.
93 ##    - run_external_command "command" - runs given command using
94 ##      system() function.
96 ## 5) In addition to binding to a key, you can also bind actions
97 ##    or chains of actions to a command. If it comes to commands,
98 ##    syntax is very similar to defining keys. Here goes example
99 ##    definition of a command:
101 ##      def_command "quit" [deferred]
102 ##        stop
103 ##        quit
105 ##    If you execute the above command (which can be done by
106 ##    invoking action execute_command, typing 'quit' and pressing
107 ##    enter), ncmpcpp will stop the player and then quit. Note the
108 ##    presence of word 'deferred' enclosed in square brackets. It
109 ##    tells ncmpcpp to wait for confirmation (ie. pressing enter)
110 ##    after you typed quit. Instead of 'deferred', 'immediate'
111 ##    could be used. Then ncmpcpp will not wait for confirmation
112 ##    (enter) and will execute the command the moment it sees it.
114 ## Note: Both 'backspace' and 'backspace_2' are used because some
115 ##       terminals interpret backspace using keycode of 'backspace'
116 ##       and some the one of 'backspace_2'. You can get away with
117 ##       binding once if all your terminal emulators use the same
118 ##       value.
120 ## Note: There is a difference between:
122 ##         def_key "key"
123 ##           action1
125 ##         def_key "key"
126 ##           action2
128 ##       and
130 ##         def_key "key"
131 ##           action1
132 ##           action2
134 ##      First one binds two single actions to the same key whilst
135 ##      second one defines a chain of actions. The behavior of
136 ##      these two is different and is described in (1) and (2).
138 ## Note: Function def_key accepts non-ascii characters.
140 ##### List of unbound actions #####
142 ## The following actions are not bound to any key/command:
144 ##  - set_volume
145 ##  - filter_playlist_on_priorities
148 #def_key "mouse"
149 #  mouse_event
151 #def_key "up"
152 #  scroll_up
154 #def_key "down"
155 #  scroll_down
157 #def_key "["
158 #  scroll_up_album
160 #def_key "]"
161 #  scroll_down_album
163 #def_key "{"
164 #  scroll_up_artist
166 #def_key "}"
167 #  scroll_down_artist
169 #def_key "page_up"
170 #  page_up
172 #def_key "page_down"
173 #  page_down
175 #def_key "home"
176 #  move_home
178 #def_key "end"
179 #  move_end
181 #def_key "space"
182 #  press_space
184 #def_key "enter"
185 #  press_enter
187 #def_key "delete"
188 #  delete_playlist_items
190 #def_key "delete"
191 #  delete_stored_playlist
193 #def_key "right"
194 #  next_column
196 #def_key "right"
197 #  slave_screen
199 #def_key "right"
200 #  volume_up
202 #def_key "+"
203 #  volume_up
205 #def_key "left"
206 #  previous_column
208 #def_key "left"
209 #  master_screen
211 #def_key "left"
212 #  volume_down
214 #def_key "-"
215 #  volume_down
217 #def_key ":"
218 #  execute_command
220 #def_key "tab"
221 #  next_screen
223 #def_key "shift_tab"
224 #  previous_screen
226 #def_key "f1"
227 #  show_help
229 #def_key "1"
230 #  show_playlist
232 #def_key "2"
233 #  show_browser
235 #def_key "2"
236 #  change_browse_mode
238 #def_key "3"
239 #  show_search_engine
241 #def_key "3"
242 #  reset_search_engine
244 #def_key "4"
245 #  show_media_library
247 #def_key "4"
248 #  toggle_media_library_columns_mode
250 #def_key "5"
251 #  show_playlist_editor
253 #def_key "6"
254 #  show_tag_editor
256 #def_key "7"
257 #  show_outputs
259 #def_key "8"
260 #  show_visualizer
262 #def_key "="
263 #  show_clock
265 #def_key "@"
266 #  show_server_info
268 #def_key "s"
269 #  stop
271 #def_key "p"
272 #  pause
274 #def_key ">"
275 #  next
277 #def_key "<"
278 #  previous
280 #def_key "ctrl_h"
281 #  jump_to_parent_directory
283 #def_key "ctrl_h"
284 #  replay_song
286 #def_key "backspace"
287 #  jump_to_parent_directory
289 #def_key "backspace"
290 #  replay_song
292 #def_key "backspace_2"
293 #  jump_to_parent_directory
295 #def_key "backspace_2"
296 #  replay_song
298 #def_key "f"
299 #  seek_forward
301 #def_key "b"
302 #  seek_backward
304 #def_key "r"
305 #  toggle_repeat
307 #def_key "z"
308 #  toggle_random
310 #def_key "y"
311 #  save_tag_changes
313 #def_key "y"
314 #  start_searching
316 #def_key "y"
317 #  toggle_single
319 #def_key "R"
320 #  toggle_consume
322 #def_key "Y"
323 #  toggle_replay_gain_mode
325 #def_key "t"
326 #  toggle_space_mode
328 #def_key "T"
329 #  toggle_add_mode
331 #def_key "|"
332 #  toggle_mouse
334 #def_key "#"
335 #  toggle_bitrate_visibility
337 #def_key "Z"
338 #  shuffle
340 #def_key "x"
341 #  toggle_crossfade
343 #def_key "X"
344 #  set_crossfade
346 #def_key "u"
347 #  update_database
349 #def_key "ctrl_v"
350 #  sort_playlist
352 #def_key "ctrl_r"
353 #  reverse_playlist
355 #def_key "ctrl_f"
356 #  apply_filter
358 #def_key "/"
359 #  find
361 #def_key "/"
362 #  find_item_forward
364 #def_key "?"
365 #  find
367 #def_key "?"
368 #  find_item_backward
370 #def_key "."
371 #  next_found_item
373 #def_key ","
374 #  previous_found_item
376 #def_key "w"
377 #  toggle_find_mode
379 #def_key "e"
380 #  edit_song
382 #def_key "e"
383 #  edit_library_tag
385 #def_key "e"
386 #  edit_library_album
388 #def_key "e"
389 #  edit_directory_name
391 #def_key "e"
392 #  edit_playlist_name
394 #def_key "e"
395 #  edit_lyrics
397 #def_key "i"
398 #  show_song_info
400 #def_key "I"
401 #  show_artist_info
403 #def_key "g"
404 #  jump_to_position_in_song
406 #def_key "l"
407 #  show_lyrics
409 #def_key "v"
410 #  reverse_selection
412 #def_key "V"
413 #  remove_selection
415 #def_key "B"
416 #  select_album
418 #def_key "a"
419 #  add_selected_items
421 #def_key "c"
422 #  clear_playlist
424 #def_key "c"
425 #  clear_main_playlist
427 #def_key "C"
428 #  crop_playlist
430 #def_key "C"
431 #  crop_main_playlist
433 #def_key "m"
434 #  move_sort_order_up
436 #def_key "m"
437 #  move_selected_items_up
439 #def_key "m"
440 #  toggle_media_library_sort_mode
442 #def_key "m"
443 #  set_visualizer_sample_multiplier
445 #def_key "n"
446 #  move_sort_order_down
448 #def_key "n"
449 #  move_selected_items_down
451 #def_key "M"
452 #  move_selected_items_to
454 #def_key "A"
455 #  add
457 #def_key "S"
458 #  save_playlist
460 #def_key "o"
461 #  jump_to_playing_song
463 #def_key "G"
464 #  jump_to_browser
466 #def_key "G"
467 #  jump_to_playlist_editor
469 #def_key "~"
470 #  jump_to_media_library
472 #def_key "E"
473 #  jump_to_tag_editor
475 #def_key "U"
476 #  toggle_playing_song_centering
478 #def_key "P"
479 #  toggle_display_mode
481 #def_key "\\"
482 #  toggle_interface
484 #def_key "!"
485 #  toggle_separators_between_albums
487 #def_key "L"
488 #  toggle_lyrics_fetcher
490 #def_key "F"
491 #  toggle_fetching_lyrics_in_background
493 #def_key "ctrl_l"
494 #  toggle_screen_lock
496 #def_key "`"
497 #  toggle_browser_sort_mode
499 #def_key "`"
500 #  toggle_library_tag_type
502 #def_key "`"
503 #  refetch_lyrics
505 #def_key "`"
506 #  add_random_items
508 #def_key "ctrl_p"
509 #  set_selected_items_priority
511 #def_key "q"
512 #  quit