Key Bindings

November 5, 2021 · View on GitHub

This is a complete list of key bindings used by Immersive. Unless explicitly stated all bindings are specific to a single menu. Keys are organized in groups, with each group specific to one menu.

Global Bindings

Always available no matter which menu is open, unless there is a binding in that menu with the same key, in which case that one takes precedence.

IDKeyAction
begin_sub_selectastart line selection
open_global_menuCtrl+aopen the global menu
show_dict_targetCtrl+Ashow dictionary/target menu
copy_active_lineccopy current subtitle to clipboard
toggle_autocopyCtoggle subtitle auto-copy
lookup_wordkselect and look up word from active subtitle
export_active_lineKcreate card from active subtitle, skip line selection
export_active_line_instantCtrl+kcreate card from active subtitle, export immediately
export_active_line_menuCtrl+Kcreate card from active subtitle, open export menu
close_menuESCgo back to previous menu
clear_menusShift+ESCclose all active menus

Available in the global menu. (Ctrl+a)

IDKeyAction
toggle_scrotstoggle screenshots on/off
reload_configrreload all non-dictionary config files

dict_target_menu

Available in the dictionary/target menu. (Ctrl+A)

IDKeyAction
prev_targetCtrl+UPswitch to previous Anki target
next_targetCtrl+DOWNswitch to next Anki target
prev_dict_groupAlt+UPswitch to previous dictionary group
next_dict_groupAlt+DOWNswitch to next dictionary group
reimport_dictsrreimport all cached dictionaries

lookup_active

Available after opening the active line menu with k.

IDKeyAction
toggle_rawrtoggle sentence substitutions
exactENTERlook up selected word
partialShift+ENTERlook up words starting with selection
transformCtrl+ENTERlook up words after applying transformations
copyccopy selection to clipboard

definition_select

Available while selecting a definition after a dictionary search.

IDKeyAction
prev_dictLEFTswitch to previous dictionary
next_dictRIGHTswitch to next dictionary
add_defCtrl+ENTERadd selected definition
confirmENTERadd selected definition and return

export_menu

Available in the export menu.

IDKeyAction
exportfexport
export_guigexport using the 'Add' GUI
export_addaexport to existing note, choose which
export_add_to_lastsexport to existing note, use last added

forvo

Available during Forvo audio selection.

IDKeyAction
playSPACEplay currently highlighted audio, fetch if not yet loaded
selectENTERconfirm selection

Available in any menu, also shown at the top left of the screen.

IDKeyAction
show_helphshow help for current menu

note_select

Available when selecting an existing note to export to.

IDKeyAction
confirmENTERconfirm selection and export

sub_select

Available during subtitle/timing selection.

IDKeyAction
set_start_subqforce start to start of active line
set_end_subeforce end to end of active line
set_start_time_posQforce start to current time
set_end_time_posEforce end to current time
set_scrotstake screenshot at current time
select_lineaselect current line
toggle_autoselectAtoggle automatic selection
preview_audioppreview selection audio
resetyreset selection
start_target_selectdend subtitle selection and enter target selection
instant_exportfend subtitle selection and export immediately
instant_export_menuFend subtitle selection and open export menu

target_select

Available during target selection.

IDKeyAction
lookup_exactENTERlook up selected word
lookup_partialShift+ENTERlook up words starting with selection
lookup_transformCtrl+ENTERlook up words after applying transformations
lookup_clipboardvlook up word from clipboard
copyccopy selection to clipboard
add_word_audioaadd Forvo audio for target word
add_word_audio_directAadd Forvo audio from current selection
delete_lineAlt+DELdelete selected line
preview_audioppreview selection audio
undo_selectionAlt+BSdelete last target word
exportfexport with selected target words
export_menuFexport with selected target words using menu

line_select

Available when there is a choice between multiple option, e.g. during target selection or when picking Forvo audio.

IDKeyAction
prevUPselect line above current
nextDOWNselect line below current

text_select

Available whenever text is selectable.

IDKeyAction
prev_charLEFTmove one character to the left
next_charRIGHTmove one character to the right
prev_wordCtrl+LEFTmove one word to the left
next_wordCtrl+RIGHTmove one word to the right
homeHOMEmove to the start of the text
endENDmove to the end of the text
prev_char_selShift+LEFTmove selection boundary to the left by one character
next_char_selShift+RIGHTmove selection boundary to the right by one character
prev_word_selCtrl+Shift+LEFTmove selection boundary to the left by one word
next_word_selCtrl+Shift+RIGHTmove selection boundary to the right by one word
home_selShift+HOMEselect from cursor to the start of the text
end_selShift+ENDselect from cursor to the end of the text

If the text can be changed (e.g. during target selection) the following keys become available:

IDKeyAction
del_prev_charBSdelete character left of the cursor, or selection if there is one
del_next_charDELdelete character right of the cursor, or selection if there is one
del_prev_wordCtrl+BSdelete from cursor to previous word boundary
del_next_wordCtrl+DELdelete from cursor to next word boundary

All key bindings used by Immersive can be changed in immersive-keys.conf (replace immersive with your script ID if it differs).

Each section defines the bindings for one of the groups listed above. Global entries before the first group set the global bindings. The values follow the same syntax as mpv's input.conf and are passed to the player as-is. Initialization of invalid bindings silently fails, though it's possible to see an error message on the console (ˋ/~).


Example config file:

copy_active_line=Ctrl+c

[target_select]
lookup_partial=Ctrl+ENTER

[sub_select]
instant_export=ENTER