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, shift_tab, ctrl_a, ctrl_b, ..., ctrl_z, f1, f2,
55 ## ..., f12, backspace, backspace_2.
57 ## - push_characters "string" - pushes given string into
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:
66 ## push_characters "custom_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:
78 ## require_runnable "apply_filter"
79 ## push_characters "custom_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
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]
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
120 ## Note: There is a difference between:
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:
145 ## - filter_playlist_on_priorities
188 # delete_playlist_items
191 # delete_stored_playlist
242 # reset_search_engine
248 # toggle_media_library_columns_mode
251 # show_playlist_editor
281 # jump_to_parent_directory
287 # jump_to_parent_directory
292 #def_key "backspace_2"
293 # jump_to_parent_directory
295 #def_key "backspace_2"
323 # toggle_replay_gain_mode
335 # toggle_bitrate_visibility
374 # previous_found_item
389 # edit_directory_name
404 # jump_to_position_in_song
425 # clear_main_playlist
437 # move_selected_items_up
440 # toggle_media_library_sort_mode
443 # set_visualizer_sample_multiplier
446 # move_sort_order_down
449 # move_selected_items_down
452 # move_selected_items_to
461 # jump_to_playing_song
467 # jump_to_playlist_editor
470 # jump_to_media_library
476 # toggle_playing_song_centering
479 # toggle_display_mode
485 # toggle_separators_between_albums
488 # toggle_lyrics_fetcher
491 # toggle_fetching_lyrics_in_background
497 # toggle_browser_sort_mode
500 # toggle_library_tag_type
509 # set_selected_items_priority