summaryrefslogtreecommitdiffstats
path: root/DOCS/client_api_examples/qtexample.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'DOCS/client_api_examples/qtexample.cpp')
-rw-r--r--DOCS/client_api_examples/qtexample.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/DOCS/client_api_examples/qtexample.cpp b/DOCS/client_api_examples/qtexample.cpp
index 39dc1fd1d4..84b1102055 100644
--- a/DOCS/client_api_examples/qtexample.cpp
+++ b/DOCS/client_api_examples/qtexample.cpp
@@ -53,6 +53,10 @@ MainWindow::MainWindow(QWidget *parent) :
// mpv as backend would implement its own key bindings.
mpv_set_option_string(mpv, "input-default-bindings", "yes");
+ // Enable keyboard input on the X11 window. For the messy details, see
+ // --input-x11-keyboard on the manpage.
+ mpv_set_option_string(mpv, "input-x11-keyboard", "yes");
+
// Let us receive property change events with MPV_EVENT_PROPERTY_CHANGE if
// this property changes.
mpv_observe_property(mpv, 0, "time-pos", MPV_FORMAT_DOUBLE);