changing default keybind
This commit is contained in:
parent
af4e34c7f1
commit
71c933ee85
@ -26,7 +26,7 @@ A simple [mpv](https://mpv.io/) Lua script that uses Google Translate API calls
|
|||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
1. **Open** a video with subtitles in mpv.
|
1. **Open** a video with subtitles in mpv.
|
||||||
2. When you see a subtitle on-screen, press **Ctrl+T** (you can change this keybind in the options at the beginning of the script).
|
2. When you see a subtitle on-screen, press **T** (you can change this keybind in the options at the beginning of the script).
|
||||||
3. The script sends the subtitle text to Google Translate, retrieves the translation, and displays it in the OSD.
|
3. The script sends the subtitle text to Google Translate, retrieves the translation, and displays it in the OSD.
|
||||||
|
|
||||||
## Changing the Target Language
|
## Changing the Target Language
|
||||||
|
@ -3,7 +3,7 @@ local o = {
|
|||||||
source_lang = 'en', -- Translate from, e.g. 'ru', 'en', 'de', etc. Change to 'auto' to detect the source language
|
source_lang = 'en', -- Translate from, e.g. 'ru', 'en', 'de', etc. Change to 'auto' to detect the source language
|
||||||
destination_lang = 'ru', -- Translate to
|
destination_lang = 'ru', -- Translate to
|
||||||
duration = 10, -- how long will the translation be shown on the OSD screen (in secs.)
|
duration = 10, -- how long will the translation be shown on the OSD screen (in secs.)
|
||||||
key_binding = "ctrl+t" -- Keybind for translating the current sub
|
key_binding = "t" -- Keybind for translating the current sub
|
||||||
}
|
}
|
||||||
|
|
||||||
local mp = require 'mp'
|
local mp = require 'mp'
|
||||||
|
Loading…
Reference in New Issue
Block a user