Commit: 9956cc73b744df9ffc476e81a3ecf0e80c9a0dea
Parent: aff73462f026816a0f19bf9f5218b8a844a0f8b6
Author: Ren Tatsumoto
Date: Tue, 4 Aug 2020 08:14:55 +0300
key bindings configuration
Diffstat:
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/README.md b/README.md
@@ -33,7 +33,8 @@ If you're using [voidrice](https://github.com/LukeSmithxyz/voidrice), you should
## Configuration
Configuration file is located at ```~/.config/mpv/script-opts/subs2srs.conf```
-and should be created by the user.
+and should be created by the user. If a parameter is not specified
+in the config file, the default value will be used.
Example configuration file:
```
@@ -76,6 +77,14 @@ snapshot_width=-2
snapshot_height=200
```
+Key bindings are configured in ```~/.config/mpv/input.conf```.
+This step is not necessary.
+```
+Ctrl+e script-binding anki-export-note
+Ctrl+s script-binding set-starting-point
+Ctrl+a script-binding abort-multiline-export
+Ctrl+t script-binding toggle-sub-autocopy
+```
## Usage
* `Ctrl+t` **t**oggles `autoclip` option.
When enabled, you can use it in combination with
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -392,7 +392,7 @@ if config.autoclip == true then clip_autocopy.enable() end
config.check_sanity()
ankiconnect.create_deck_if_doesnt_exist(config.deck_name)
-mp.add_key_binding("ctrl+e", "anki-add-note", export_to_anki)
+mp.add_key_binding("ctrl+e", "anki-export-note", export_to_anki)
mp.add_key_binding("ctrl+s", "set-starting-point", subs.set_starting_point)
mp.add_key_binding("ctrl+a", "abort-multiline-export", subs.clear)
mp.add_key_binding("ctrl+t", "toggle-sub-autocopy", clip_autocopy.toggle)