Update keybindings documentation
This commit is contained in:
parent
c886909298
commit
8531584633
220
README.rst
220
README.rst
|
@ -73,75 +73,191 @@ Open a Youtube playlist with video height lower than 720::
|
||||||
Keyboard control
|
Keyboard control
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
Bindings inherited from mpv
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
For convenience purpose, I try to mimic **mpv** default keybindings, but many
|
||||||
|
are slightly different from **mpv** exact behaviour (mainly because of the lack
|
||||||
|
of keys which are unsupported by ``curses``). So I will list all of them here
|
||||||
|
for you to `compare <https://github.com/mpv-player/mpv/blob/master/DOCS/man/mpv.rst#keyboard-control>`_:
|
||||||
|
|
||||||
|
Left and Right
|
||||||
|
Seek backward/forward 5 seconds. Shifted arrow does a 1 second seek.
|
||||||
|
|
||||||
|
Up and Down
|
||||||
|
Seek backward/forward 1 minute.
|
||||||
|
|
||||||
|
``[`` and ``]``
|
||||||
|
Decrease/increase current playback speed by 10%.
|
||||||
|
|
||||||
|
``{`` and ``}``
|
||||||
|
Halve/double current playback speed.
|
||||||
|
|
||||||
|
Backspace
|
||||||
|
Reset playback speed to normal.
|
||||||
|
|
||||||
|
``<`` and ``>``
|
||||||
|
Go backward/forward in the playlist.
|
||||||
|
|
||||||
Return
|
Return
|
||||||
Start playing.
|
Start playing.
|
||||||
|
|
||||||
Space, ``p``
|
Space / ``p``
|
||||||
Toggle pause.
|
Pause (pressing again unpauses).
|
||||||
|
|
||||||
``/``, ``?``
|
``.``
|
||||||
Search forward/backward for a pattern.
|
Step forward. Pressing once will pause, every consecutive press will play
|
||||||
|
one frame and then go into pause mode again.
|
||||||
|
|
||||||
``<``, ``>``
|
``,``
|
||||||
Go backward/forward in the playlist.
|
Step backward. Pressing once will pause, every consecutive press will play
|
||||||
|
one frame in reverse and then go into pause mode again.
|
||||||
|
|
||||||
``A``
|
``q``
|
||||||
Toggle mute.
|
Stop playing and quit.
|
||||||
|
|
||||||
``D``
|
``/`` / ``9`` and ``*`` / ``0``
|
||||||
Delete the current entry.
|
Decrease/increase volume.
|
||||||
|
|
||||||
``N``
|
``m``
|
||||||
Repeat previous search in reverse direction.
|
Mute sound.
|
||||||
|
|
||||||
|
``_``
|
||||||
|
Cycle through the available video tracks.
|
||||||
|
|
||||||
|
``#``
|
||||||
|
Cycle through the available audio tracks.
|
||||||
|
|
||||||
|
``f``
|
||||||
|
Toggle fullscreen.
|
||||||
|
|
||||||
|
``T``
|
||||||
|
Toggle stay-on-top.
|
||||||
|
|
||||||
|
``w`` and ``e``
|
||||||
|
Decrease/increase pan-and-scan range.
|
||||||
|
|
||||||
|
``o`` / ``P``
|
||||||
|
Show progression bar, elapsed time and total duration on the OSD.
|
||||||
|
|
||||||
|
``O``
|
||||||
|
Toggle OSD states between normal and playback time/duration.
|
||||||
|
|
||||||
|
``v``
|
||||||
|
Toggle subtitle visibility.
|
||||||
|
|
||||||
|
``j`` and ``J``
|
||||||
|
Cycle through the available subtitles.
|
||||||
|
|
||||||
|
``x`` and ``z``
|
||||||
|
Adjust subtitle delay by +/- 0.1 seconds.
|
||||||
|
|
||||||
|
``l``
|
||||||
|
Set/clear A-B loop points.
|
||||||
|
|
||||||
|
``L``
|
||||||
|
Toggle infinite looping.
|
||||||
|
|
||||||
|
Ctrl-``+`` and Ctrl-``-``
|
||||||
|
Adjust audio delay (A/V sync) by +/- 0.1 seconds.
|
||||||
|
|
||||||
|
``u``
|
||||||
|
Switch between applying no style overrides to SSA/ASS subtitles, and
|
||||||
|
overriding them almost completely with the normal subtitle style.
|
||||||
|
|
||||||
``V``
|
``V``
|
||||||
Toggle video.
|
Toggle subtitle VSFilter aspect compatibility mode.
|
||||||
|
|
||||||
|
``r`` and ``t``
|
||||||
|
Move subtitles up/down.
|
||||||
|
|
||||||
|
``s``
|
||||||
|
Take a screenshot.
|
||||||
|
|
||||||
|
``S``
|
||||||
|
Take a screenshot, without subtitles.
|
||||||
|
|
||||||
|
Alt-``s``
|
||||||
|
Take a screenshot each frame.
|
||||||
|
|
||||||
|
Page Up and Page Down
|
||||||
|
Seek to the beginning of the previous/next chapter.
|
||||||
|
|
||||||
|
``d``
|
||||||
|
Activate/deactivate deinterlacer.
|
||||||
|
|
||||||
|
``A``
|
||||||
|
Cycle aspect ratio override.
|
||||||
|
|
||||||
|
``1`` and ``2``
|
||||||
|
Adjust contrast.
|
||||||
|
|
||||||
|
``3`` and ``4``
|
||||||
|
Adjust brightness.
|
||||||
|
|
||||||
|
``5`` and ``6``
|
||||||
|
Adjust gamma.
|
||||||
|
|
||||||
|
``7`` and ``8``
|
||||||
|
Adjust saturation.
|
||||||
|
|
||||||
|
Alt-``0``
|
||||||
|
Resize video window to half its original size.
|
||||||
|
|
||||||
|
Alt-``1``
|
||||||
|
Resize video window to its original size.
|
||||||
|
|
||||||
|
Alt-``2``
|
||||||
|
Resize video window to double its original size.
|
||||||
|
|
||||||
|
``E``
|
||||||
|
Cycle through editions.
|
||||||
|
|
||||||
|
Movements and selections
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
The following keybindings are Emacs-like since most characters are taken by
|
||||||
|
**mpv**.
|
||||||
|
|
||||||
|
Ctrl-``p`` and Ctrl-``n``
|
||||||
|
Move a single line up/down.
|
||||||
|
|
||||||
|
Alt-``v`` and Ctrl-``v``
|
||||||
|
Move a single page up/down.
|
||||||
|
|
||||||
|
Home / Ctrl-``<`` and End / Ctrl-``>``
|
||||||
|
Move to the beginning/end of the playlist.
|
||||||
|
|
||||||
|
Ctrl-Space
|
||||||
|
Deselect/reselect the current entry and move down a line.
|
||||||
|
|
||||||
|
Playlist manipulation
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Ctrl-``o``
|
||||||
|
Open playlist.
|
||||||
|
|
||||||
|
Ctrl-``i``
|
||||||
|
Insert playlist.
|
||||||
|
|
||||||
|
Ctrl-``f`` and Alt-``f``
|
||||||
|
Search forward/backward for a pattern.
|
||||||
|
|
||||||
|
Alt-``m``
|
||||||
|
Cycle through playing modes.
|
||||||
|
|
||||||
|
Delete
|
||||||
|
Delete the current entry.
|
||||||
|
|
||||||
``W``
|
``W``
|
||||||
Save the current playlist under JSON format.
|
Save the current playlist under JSON format.
|
||||||
|
|
||||||
``d``
|
|
||||||
Deselect/reselect the current entry.
|
|
||||||
|
|
||||||
``i``
|
|
||||||
Insert playlist.
|
|
||||||
|
|
||||||
``m``, ``M``
|
|
||||||
Cycle forward/backward through playing modes.
|
|
||||||
|
|
||||||
``n``
|
|
||||||
Repeat previous search.
|
|
||||||
|
|
||||||
``o``
|
|
||||||
Open playlist.
|
|
||||||
|
|
||||||
Up, ``k``
|
|
||||||
Move a single line up.
|
|
||||||
|
|
||||||
Down, ``j``
|
|
||||||
Move a single line down.
|
|
||||||
|
|
||||||
Left, ``h``
|
|
||||||
Seek backward 5 seconds.
|
|
||||||
|
|
||||||
Right, ``l``
|
|
||||||
Seek forward 5 seconds.
|
|
||||||
|
|
||||||
Home
|
|
||||||
Move to the beginning of the playlist.
|
|
||||||
|
|
||||||
End
|
|
||||||
Move to the end of the playlist.
|
|
||||||
|
|
||||||
Page Up
|
|
||||||
Move a single page up.
|
|
||||||
|
|
||||||
Page Down
|
|
||||||
Move a single page down.
|
|
||||||
|
|
||||||
F5
|
F5
|
||||||
Redraw the screen content.
|
Redraw the screen content.
|
||||||
|
|
||||||
|
``:``
|
||||||
|
Execute a **mpv** command.
|
||||||
|
|
||||||
Configuration files
|
Configuration files
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
|
|
10
comp
10
comp
|
@ -517,11 +517,8 @@ with Comp(entries, json_file, mode, vo, ytdlf) as comp:
|
||||||
comp.search()
|
comp.search()
|
||||||
elif c == alt('f'):
|
elif c == alt('f'):
|
||||||
comp.search(backward=True)
|
comp.search(backward=True)
|
||||||
elif c == ctrl('m'):
|
|
||||||
comp.mode = MODES[(MODES.index(comp.mode) + 1) % 8]
|
|
||||||
comp.update_status()
|
|
||||||
elif c == alt('m'):
|
elif c == alt('m'):
|
||||||
comp.mode = MODES[(MODES.index(comp.mode) - 1) % 8]
|
comp.mode = MODES[(MODES.index(comp.mode) + 1) % 8]
|
||||||
comp.update_status()
|
comp.update_status()
|
||||||
elif c == curses.KEY_DC:
|
elif c == curses.KEY_DC:
|
||||||
comp.entries.pop(comp.idx())
|
comp.entries.pop(comp.idx())
|
||||||
|
@ -534,4 +531,9 @@ with Comp(entries, json_file, mode, vo, ytdlf) as comp:
|
||||||
comp.dump_json()
|
comp.dump_json()
|
||||||
elif c in (curses.KEY_F5, curses.KEY_RESIZE):
|
elif c in (curses.KEY_F5, curses.KEY_RESIZE):
|
||||||
comp.resize()
|
comp.resize()
|
||||||
|
elif c == ':':
|
||||||
|
try:
|
||||||
|
comp.mp.command(*comp.read_input(':').split())
|
||||||
|
except:
|
||||||
|
comp.print_msg(_("Failed to execute command"), error=True)
|
||||||
c = comp.scr.get_wch()
|
c = comp.scr.get_wch()
|
||||||
|
|
229
doc/comp.1
229
doc/comp.1
|
@ -1,7 +1,7 @@
|
||||||
.\" Process this file with
|
.\" Process this file with
|
||||||
.\" groff -man -Tutf8 comp.1
|
.\" groff -man -Tutf8 comp.1
|
||||||
.\"
|
.\"
|
||||||
.TH COMP 1 2017-06-17 comp
|
.TH COMP 1 2018-01-25 comp
|
||||||
.SH NAME
|
.SH NAME
|
||||||
comp \- Curses Omni Media Player
|
comp \- Curses Omni Media Player
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -11,8 +11,10 @@ comp \- Curses Omni Media Player
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
\fBcomp\fR is a
|
\fBcomp\fR is a
|
||||||
.BR mpv (1)
|
.BR mpv (1)
|
||||||
front-end using curses. It has basic media player functions and can to extract
|
front-end using
|
||||||
playlists from multiple sources such as media sites supported by
|
.BR curses (3).
|
||||||
|
It has basic media player functions and can to extract playlists from multiple
|
||||||
|
sources such as media sites supported by
|
||||||
.BR youtube-dl (1),
|
.BR youtube-dl (1),
|
||||||
local and direct URL to video/audio and its own JSON playlist format.
|
local and direct URL to video/audio and its own JSON playlist format.
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
|
@ -47,75 +49,192 @@ for details and descriptions of available drivers
|
||||||
.B -f \fIYTDL_FORMAT\fR, \fB--format \fIYTDL_FORMAT
|
.B -f \fIYTDL_FORMAT\fR, \fB--format \fIYTDL_FORMAT
|
||||||
video format/quality to be passed to youtube-dl
|
video format/quality to be passed to youtube-dl
|
||||||
.SH KEYBOARD CONTROL
|
.SH KEYBOARD CONTROL
|
||||||
|
.SS Bindings inherited from mpv
|
||||||
|
For convenience purpose, I try to mimic
|
||||||
|
.BR mpv (1)
|
||||||
|
default keybindings, but many are slightly different from
|
||||||
|
.BR mpv (1)
|
||||||
|
exact behaviour (mainly because of the lack of keys which are unsupported by
|
||||||
|
.BR curses (3)).
|
||||||
|
So I will list all of them here for you to compare:
|
||||||
|
.TP
|
||||||
|
.B Left and Right
|
||||||
|
Seek backward/forward 5 seconds. Shifted arrow does a 1 second seek.
|
||||||
|
.TP
|
||||||
|
.B Up and Down
|
||||||
|
Seek backward/forward 1 minute.
|
||||||
|
.TP
|
||||||
|
.B [ and ]
|
||||||
|
Decrease/increase current playback speed by 10%.
|
||||||
|
.TP
|
||||||
|
.B { and }
|
||||||
|
Halve/double current playback speed.
|
||||||
|
.TP
|
||||||
|
.B Backspace
|
||||||
|
Reset playback speed to normal.
|
||||||
|
.TP
|
||||||
|
.B < and >
|
||||||
|
Go backward/forward in the playlist.
|
||||||
.TP
|
.TP
|
||||||
.B Return
|
.B Return
|
||||||
Start playing.
|
Start playing.
|
||||||
.TP
|
.TP
|
||||||
.B Space, p
|
.B Space / p
|
||||||
Toggle pause.
|
Pause (pressing again unpauses).
|
||||||
.TP
|
.TP
|
||||||
.B /, ?
|
.B .
|
||||||
Search forward/backward for a pattern.
|
Step forward. Pressing once will pause, every consecutive press will play
|
||||||
|
one frame and then go into pause mode again.
|
||||||
.TP
|
.TP
|
||||||
.B <, >
|
.B ,
|
||||||
Go backward/forward in the playlist.
|
Step backward. Pressing once will pause, every consecutive press will play
|
||||||
|
one frame in reverse and then go into pause mode again.
|
||||||
.TP
|
.TP
|
||||||
.B A
|
.B q
|
||||||
Toggle mute.
|
Stop playing and quit.
|
||||||
.TP
|
.TP
|
||||||
.B D
|
.B / and *
|
||||||
Delete the current entry.
|
Decrease/increase volume.
|
||||||
.TP
|
.TP
|
||||||
.B N
|
.B 9 and 0
|
||||||
Repeat previous search in reverse direction.
|
Decrease/increase volume.
|
||||||
|
.TP
|
||||||
|
.B m
|
||||||
|
Mute sound.
|
||||||
|
.TP
|
||||||
|
.B _
|
||||||
|
Cycle through the available video tracks.
|
||||||
|
.TP
|
||||||
|
.B #
|
||||||
|
Cycle through the available audio tracks.
|
||||||
|
.TP
|
||||||
|
.B f
|
||||||
|
Toggle fullscreen.
|
||||||
|
.TP
|
||||||
|
.B T
|
||||||
|
Toggle stay-on-top.
|
||||||
|
.TP
|
||||||
|
.B w and e
|
||||||
|
Decrease/increase pan-and-scan range.
|
||||||
|
.TP
|
||||||
|
.B o or P
|
||||||
|
Show progression bar, elapsed time and total duration on the OSD.
|
||||||
|
.TP
|
||||||
|
.B O
|
||||||
|
Toggle OSD states between normal and playback time/duration.
|
||||||
|
.TP
|
||||||
|
.B v
|
||||||
|
Toggle subtitle visibility.
|
||||||
|
.TP
|
||||||
|
.B j and J
|
||||||
|
Cycle through the available subtitles.
|
||||||
|
.TP
|
||||||
|
.B x and z
|
||||||
|
Adjust subtitle delay by +/- 0.1 seconds.
|
||||||
|
.TP
|
||||||
|
.B l
|
||||||
|
Set/clear A-B loop points.
|
||||||
|
.TP
|
||||||
|
.B L
|
||||||
|
Toggle infinite looping.
|
||||||
|
.TP
|
||||||
|
.B Ctrl-+ and Ctrl--
|
||||||
|
Adjust audio delay (A/V sync) by +/- 0.1 seconds.
|
||||||
|
.TP
|
||||||
|
.B u
|
||||||
|
Switch between applying no style overrides to SSA/ASS subtitles, and
|
||||||
|
overriding them almost completely with the normal subtitle style.
|
||||||
.TP
|
.TP
|
||||||
.B V
|
.B V
|
||||||
Toggle video.
|
Toggle subtitle VSFilter aspect compatibility mode.
|
||||||
|
.TP
|
||||||
|
.B r and t
|
||||||
|
Move subtitles up/down.
|
||||||
|
.TP
|
||||||
|
.B s
|
||||||
|
Take a screenshot.
|
||||||
|
.TP
|
||||||
|
.B S
|
||||||
|
Take a screenshot, without subtitles.
|
||||||
|
.TP
|
||||||
|
.B Alt-s
|
||||||
|
Take a screenshot each frame.
|
||||||
|
.TP
|
||||||
|
.B Page Up and Page Down
|
||||||
|
Seek to the beginning of the previous/next chapter.
|
||||||
|
.TP
|
||||||
|
.B d
|
||||||
|
Activate/deactivate deinterlacer.
|
||||||
|
.TP
|
||||||
|
.B A
|
||||||
|
Cycle aspect ratio override.
|
||||||
|
.TP
|
||||||
|
.B 1 and 2
|
||||||
|
Adjust contrast.
|
||||||
|
.TP
|
||||||
|
.B 3 and 4
|
||||||
|
Adjust brightness.
|
||||||
|
.TP
|
||||||
|
.B 5 and 6
|
||||||
|
Adjust gamma.
|
||||||
|
.TP
|
||||||
|
.B 7 and 8
|
||||||
|
Adjust saturation.
|
||||||
|
.TP
|
||||||
|
.B Alt-0
|
||||||
|
Resize video window to half its original size.
|
||||||
|
.TP
|
||||||
|
.B Alt-1
|
||||||
|
Resize video window to its original size.
|
||||||
|
.TP
|
||||||
|
.B Alt-2
|
||||||
|
Resize video window to double its original size.
|
||||||
|
.TP
|
||||||
|
.B E
|
||||||
|
Cycle through editions.
|
||||||
|
.SS Movements and selections
|
||||||
|
The following keybindings are Emacs-like since most characters are taken by
|
||||||
|
.BR mpv (1).
|
||||||
|
.TP
|
||||||
|
.B Ctrl-p and Ctrl-n
|
||||||
|
Move a single line up/down.
|
||||||
|
.TP
|
||||||
|
.B Alt-v and Ctrl-v
|
||||||
|
Move a single page up/down.
|
||||||
|
.TP
|
||||||
|
.B Ctrl-< and Ctrl->
|
||||||
|
Move to the beginning/end of the playlist.
|
||||||
|
.TP
|
||||||
|
.B Home and End
|
||||||
|
Move to the beginning/end of the playlist.
|
||||||
|
.TP
|
||||||
|
.B Ctrl-Space
|
||||||
|
Deselect/reselect the current entry and move down a line.
|
||||||
|
.SS Playlist manipulation
|
||||||
|
.TP
|
||||||
|
.B Ctrl-o
|
||||||
|
Open playlist.
|
||||||
|
.TP
|
||||||
|
.B Ctrl-i
|
||||||
|
Insert playlist.
|
||||||
|
.TP
|
||||||
|
.B Ctrl-f and Alt-f
|
||||||
|
Search forward/backward for a pattern.
|
||||||
|
.TP
|
||||||
|
.B Alt-m
|
||||||
|
Cycle through playing modes.
|
||||||
|
.TP
|
||||||
|
.B Delete
|
||||||
|
Delete the current entry.
|
||||||
.TP
|
.TP
|
||||||
.B W
|
.B W
|
||||||
Save the current playlist under JSON format.
|
Save the current playlist under JSON format.
|
||||||
.TP
|
.TP
|
||||||
.B d
|
|
||||||
Deselect/reselect the current entry.
|
|
||||||
.TP
|
|
||||||
.B i
|
|
||||||
Insert playlist.
|
|
||||||
.TP
|
|
||||||
.B m, M
|
|
||||||
Cycle forward/backward through playing modes.
|
|
||||||
.TP
|
|
||||||
.B n
|
|
||||||
Repeat previous search.
|
|
||||||
.TP
|
|
||||||
.B o
|
|
||||||
Open playlist.
|
|
||||||
.TP
|
|
||||||
.B Up, k
|
|
||||||
Move a single line up.
|
|
||||||
.TP
|
|
||||||
.B Down, j
|
|
||||||
Move a single line down.
|
|
||||||
.TP
|
|
||||||
.B Left, h
|
|
||||||
Seek backward 5 seconds.
|
|
||||||
.TP
|
|
||||||
.B Right, l
|
|
||||||
Seek forward 5 seconds.
|
|
||||||
.TP
|
|
||||||
.B Home
|
|
||||||
Move to the beginning of the playlist.
|
|
||||||
.TP
|
|
||||||
.B End
|
|
||||||
Move to the end of the playlist.
|
|
||||||
.TP
|
|
||||||
.B Page Up
|
|
||||||
Move a single page up.
|
|
||||||
.TP
|
|
||||||
.B Page Down
|
|
||||||
Move a single page down.
|
|
||||||
.TP
|
|
||||||
.B F5
|
.B F5
|
||||||
Redraw the screen content.
|
Redraw the screen content.
|
||||||
|
.TP
|
||||||
|
.B :
|
||||||
|
Execute a mpv command.
|
||||||
.SH FILES
|
.SH FILES
|
||||||
.TP
|
.TP
|
||||||
.I ~/.config/comp/settings.ini
|
.I ~/.config/comp/settings.ini
|
||||||
|
|
2
setup.py
2
setup.py
|
@ -7,7 +7,7 @@ with open('README.rst') as f:
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='comp',
|
name='comp',
|
||||||
version='0.4.1',
|
version='0.4.2',
|
||||||
description=('Curses Omni Media Player'),
|
description=('Curses Omni Media Player'),
|
||||||
long_description=long_description,
|
long_description=long_description,
|
||||||
url='https://github.com/McSinyx/comp',
|
url='https://github.com/McSinyx/comp',
|
||||||
|
|
Loading…
Reference in New Issue