* feat: support custom key mapping
* remove testing code
* feat: support function key
* style: add comment
* feat: support read config
* docs: add keymap.yaml example
* docs: add function key in README
* refactor: rename config key name
* feat: support Alt prefix
* docs: fix syntax
* feat: let exit be configurable
* refactor: remove KeyEsc in keyNames
* refactor: space to Space
* refactor: style code
After update tview (49200f8), the background color of button get wrong.
The SetBackgroundColor doesn't work. Use SetStyle and SetActivatedStyle
instead.
GetSrcLang, GetDstLang, SetSrcLang, SetDstLang, SwapLang are reusable
functions from translator to translator. So make Language struct.
GetEngineName is also a reusable function. So make EngineName struct.
Finally, let Translator to inherit those functions in these three
(Language, TTSLock, EngineName) structs. No need to write the duplicated
functions for each Translator.
- rename function `translatePageHandler` to `translateWindow`
- reorder function call in `ui.go`, let function call jointed
- change the position of comment