1 ##########################################################
2 ## this is example bindings configuration file, copy it ##
3 ## to ~/.ncmpcpp/bindings and set up your preferences ##
4 ##########################################################
6 ##### General rules #####
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:
25 ## This creates 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 actions failed to execute
28 ## due to its requirements not being met. Note that
29 ## execution of chain of actions ALWAYS succeeds, no
30 ## matter if one of actions from the chain failed (even
31 ## if it was the first one in order and thus nothing
32 ## was really executed). Because of that, if you decide
33 ## to bind both actions and chains to a single key, make
34 ## sure that chain is defined in the end. Otherwise, all
35 ## actions bound to the key after chain will never be run.
37 ## 3) When ncmpcpp starts, bindings configuration file is
38 ## parsed and then ncmpcpp provides "missing pieces"
39 ## of default keybindings. If you want to disable some
40 ## bindings, there is a special action called 'dummy'
41 ## for that purpose. Eg. if you want to disable ability
42 ## to crop playlists, you need to put the following
43 ## into configuration file:
48 ## After that ncmpcpp will not bind any default action
51 ## 4) To let you write simple macros, the following special
52 ## actions are provided:
54 ## - push_character "character" - pushes given special
55 ## character into input queue, so it will be immediately
56 ## picked by ncmpcpp upon next call to readKey function.
57 ## Accepted values: mouse, up, down, page_up, page_down,
58 ## home, end, space, enter, insert, delete, left, right,
59 ## tab, shift_tab, ctrl_a, ctrl_b, ..., ctrl_z, f1, f2,
60 ## ..., f12, backspace, backspace_2.
62 ## - push_characters "string" - pushes given string into
65 ## - require_runnable "action" - checks whether given action
66 ## is runnable and fails if it isn't. This is especially
67 ## useful when mixed with previous two functions. Consider
68 ## the following macro definition:
71 ## push_characters "custom_filter"
74 ## If apply_filter can't be currently run, we end up with
75 ## sequence of characters in input queue which will be
76 ## treated just as we typed them. This may lead to unexpected
77 ## results (in this case 'c' will most likely clear current
78 ## playlist, 'u' will trigger database update, 's' will stop
79 ## playback etc.). To prevent such thing from happening, we
80 ## need to change above definition to this one:
83 ## require_runnable "apply_filter"
84 ## push_characters "custom_filter"
87 ## Here, first we test whether apply_filter can be actually run
88 ## before we stuff characters into input queue, so if condition
89 ## is not met, whole chain is aborted and we're fine.
91 ## - require_screen "screen" - checks whether given screen is
92 ## currently active. accepted values: browser, clock, help,
93 ## media_library, outputs, playlist, playlist_editor,
94 ## search_engine, tag_editor, visualizer, last_fm, lyrics,
95 ## selected_items_adder, server_info, song_info,
96 ## sort_playlist_dialog, tiny_tag_editor.
98 ## - run_external_command "command" - runs given command using
101 ## 5) In addition to binding to a key, you can also bind actions
102 ## or chains of actions to a command. If it comes to commands,
103 ## syntax is very similar to defining keys. Here goes example
104 ## definition of a command:
106 ## def_command "quit" [deferred]
110 ## If you execute the above command (which can be done by
111 ## invoking action execute_command, typing 'quit' and pressing
112 ## enter), ncmpcpp will stop the player and then quit. Note the
113 ## presence of word 'deferred' enclosed in square brackets. It
114 ## tells ncmpcpp to wait for confirmation (ie. pressing enter)
115 ## after you typed quit. Instead of 'deferred', 'immediate'
116 ## could be used. Then ncmpcpp will not wait for confirmation
117 ## (enter) and will execute the command the moment it sees it.
119 ## Note: Both 'backspace' and 'backspace_2' are used because some
120 ## terminals interpret backspace using keycode of 'backspace'
121 ## and some the one of 'backspace_2'. You can get away with
122 ## binding once if all your terminal emulators use the same
125 ## Note: There is a difference between:
139 ## First one binds two single actions to the same key whilst
140 ## second one defines a chain of actions. The behavior of
141 ## these two is different and is described in (1) and (2).
143 ## Note: Function def_key accepts non-ascii characters.
145 ##### List of unbound actions #####
147 ## The following actions are not bound to any key/command:
150 ## - filter_playlist_on_priorities
193 # delete_playlist_items
196 # delete_stored_playlist
247 # reset_search_engine
253 # toggle_media_library_columns_mode
256 # show_playlist_editor
286 # jump_to_parent_directory
292 # jump_to_parent_directory
297 #def_key "backspace_2"
298 # jump_to_parent_directory
300 #def_key "backspace_2"
328 # toggle_replay_gain_mode
340 # toggle_bitrate_visibility
379 # previous_found_item
394 # edit_directory_name
409 # jump_to_position_in_song
430 # clear_main_playlist
442 # move_selected_items_up
445 # toggle_media_library_sort_mode
448 # move_sort_order_down
451 # move_selected_items_down
454 # move_selected_items_to
463 # jump_to_playing_song
469 # jump_to_playlist_editor
472 # jump_to_media_library
478 # toggle_playing_song_centering
481 # toggle_display_mode
487 # toggle_separators_between_albums
490 # toggle_lyrics_fetcher
493 # toggle_fetching_lyrics_in_background
499 # toggle_browser_sort_mode
502 # toggle_library_tag_type
511 # set_selected_items_priority