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 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:
43 ## After that ncmpcpp will not bind any default action
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, ctrl-a, ctrl-b, ..., ctrl-z, ctrl-[, ctrl-\\,
55 ## ctrl-], ctrl-^, ctrl-_, f1, f2, ..., f12, backspace.
56 ## In addition, most of these names can be prefixed with
57 ## alt-/ctrl-/shift- to be recognized with the appropriate
60 ## - push_characters "string" - pushes given string into
63 ## - require_runnable "action" - checks whether given action
64 ## is runnable and fails if it isn't. This is especially
65 ## useful when mixed with previous two functions. Consider
66 ## the following macro definition:
69 ## push_characters "custom_filter"
72 ## If apply_filter can't be currently run, we end up with
73 ## sequence of characters in input queue which will be
74 ## treated just as we typed them. This may lead to unexpected
75 ## results (in this case 'c' will most likely clear current
76 ## playlist, 'u' will trigger database update, 's' will stop
77 ## playback etc.). To prevent such thing from happening, we
78 ## need to change above definition to this one:
81 ## require_runnable "apply_filter"
82 ## push_characters "custom_filter"
85 ## Here, first we test whether apply_filter can be actually run
86 ## before we stuff characters into input queue, so if condition
87 ## is not met, whole chain is aborted and we're fine.
89 ## - require_screen "screen" - checks whether given screen is
90 ## currently active. accepted values: browser, clock, help,
91 ## media_library, outputs, playlist, playlist_editor,
92 ## search_engine, tag_editor, visualizer, last_fm, lyrics,
93 ## selected_items_adder, server_info, song_info,
94 ## sort_playlist_dialog, tiny_tag_editor.
96 ## - run_external_command "command" - runs given command using
99 ## 5) In addition to binding to a key, you can also bind actions
100 ## or chains of actions to a command. If it comes to commands,
101 ## syntax is very similar to defining keys. Here goes example
102 ## definition of a command:
104 ## def_command "quit" [deferred]
108 ## If you execute the above command (which can be done by
109 ## invoking action execute_command, typing 'quit' and pressing
110 ## enter), ncmpcpp will stop the player and then quit. Note the
111 ## presence of word 'deferred' enclosed in square brackets. It
112 ## tells ncmpcpp to wait for confirmation (ie. pressing enter)
113 ## after you typed quit. Instead of 'deferred', 'immediate'
114 ## could be used. Then ncmpcpp will not wait for confirmation
115 ## (enter) and will execute the command the moment it sees it.
117 ## Note: while command chains are executed, internal environment
118 ## update (which includes current window refresh and mpd status
119 ## update) is not performed for performance reasons. However, it
120 ## may be desirable to do so in some situration. Therefore it's
121 ## possible to invoke by hand by performing 'update enviroment'
124 ## Note: There is a difference between:
138 ## First one binds two single actions to the same key whilst
139 ## second one defines a chain of actions. The behavior of
140 ## these two is different and is described in (1) and (2).
142 ## Note: Function def_key accepts non-ascii characters.
144 ##### List of unbound actions #####
146 ## The following actions are not bound to any key/command:
164 #def_key "shift-down"
208 # add_item_to_playlist
211 # toggle_lyrics_update_on_song_change
214 # toggle_visualization_type
217 # delete_playlist_items
220 # delete_browser_items
223 # delete_stored_playlist
274 # reset_search_engine
280 # toggle_media_library_columns_mode
283 # show_playlist_editor
313 # jump_to_parent_directory
319 # jump_to_parent_directory
349 # toggle_replay_gain_mode
358 # toggle_bitrate_visibility
376 # toggle_browser_sort_mode
379 # toggle_media_library_sort_mode
406 # previous_found_item
421 # edit_directory_name
436 # jump_to_position_in_song
460 # clear_main_playlist
472 # move_selected_items_up
475 # move_sort_order_down
478 # move_selected_items_down
481 # move_selected_items_to
490 # jump_to_playing_song
496 # jump_to_playlist_editor
499 # jump_to_media_library
505 # toggle_playing_song_centering
508 # toggle_display_mode
514 # toggle_separators_between_albums
517 # toggle_lyrics_fetcher
520 # fetch_lyrics_in_background
523 # toggle_fetching_lyrics_in_background
529 # toggle_library_tag_type
538 # set_selected_items_priority