diff options
| author | Martin Lambers <marlam@marlam.de> | 2011-04-18 21:33:43 +0200 |
|---|---|---|
| committer | Martin Lambers <marlam@marlam.de> | 2011-04-18 21:33:43 +0200 |
| commit | 3275d6a57275c217b68d315cc09a5b99f95dcb99 (patch) | |
| tree | 4e35e2804f1d55963bc01b4415a3d0e9c595359a | |
| parent | 988833755cf9e6727463df1547b98c7aec462a6e (diff) | |
| download | bino-3275d6a57275c217b68d315cc09a5b99f95dcb99.tar.gz | |
Change ESC key meaning.
ESC is not equivalent to q anymore. When in fullscreen mode, it now simply ends
fullscreen mode. It only stops playback when in window mode.
| -rw-r--r-- | doc/bino.1 | 4 | ||||
| -rw-r--r-- | doc/bino.texi | 3 | ||||
| -rw-r--r-- | src/main.cpp | 3 | ||||
| -rw-r--r-- | src/video_output_qt.cpp | 12 |
4 files changed, 19 insertions, 3 deletions
@@ -189,7 +189,9 @@ Amount of crosstalk ghostbusting to apply (0 to 1). Benchmark mode: no audio, no time synchronization, output of frames-per-second measurements. .SH INTERACTIVE CONTROL -.IP "q or ESC" +.IP "ESC" +Leave fullscreen mode, or quit when in window mode. +.IP "q" Quit. .IP "p or SPACE" Pause / unpause. diff --git a/doc/bino.texi b/doc/bino.texi index 1c8a2d8..f503732 100644 --- a/doc/bino.texi +++ b/doc/bino.texi @@ -309,8 +309,9 @@ shortcuts, e.g. by clicking into it. The following shortcuts are recognized: @table @kbd -@item q @item ESC +Leave fullscreen mode, or quit when in window mode. +@item q Quit. @item p @item SPACE diff --git a/src/main.cpp b/src/main.cpp index f03287a..7d01acd 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -344,7 +344,8 @@ int main(int argc, char *argv[]) " -b|--benchmark Benchmark mode (no audio, show fps).\n" "\n" "Interactive control:\n" - " q or ESC Quit.\n" + " ESC Leave fullscreen mode, or quit.\n" + " q Quit.\n" " p or SPACE Pause / unpause.\n" " f Toggle fullscreen.\n" " c Center window.\n" diff --git a/src/video_output_qt.cpp b/src/video_output_qt.cpp index 67ef54a..b279664 100644 --- a/src/video_output_qt.cpp +++ b/src/video_output_qt.cpp @@ -109,6 +109,18 @@ void video_output_qt_widget::keyPressEvent(QKeyEvent *event) switch (event->key()) { case Qt::Key_Escape: + // ESC should stop playback, unless we're in fullscreen mode. + // In that case, it should simply leave fullscreen mode, since + // this is what most users expect. + if (_vo->_fullscreen) + { + _vo->send_cmd(command::toggle_fullscreen); + } + else + { + _vo->send_cmd(command::toggle_play); + } + break; case Qt::Key_Q: _vo->send_cmd(command::toggle_play); break; |
