From 8c8649cfcd710859ce18eab557ed2af8cedb9a42 Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Mon, 3 Jun 2019 11:44:39 +0200 Subject: [PATCH] Remove "turn device screen on" feature Only keep "turn device screen off" and POWER button. After we turn the device screen off (with Ctrl+o), turning it back on does not always work, and leaves the device in a weird state, where even the power button may not be sufficient: This is not an acceptable behavior, so disable the shortcut to turn the physical device screen on. We can use the POWER button (or Ctrl+p) instead. --- README.md | 1 - app/src/input_manager.c | 7 ++----- app/src/main.c | 3 --- 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0ee6d79b..a0bc3914 100644 --- a/README.md +++ b/README.md @@ -286,7 +286,6 @@ you are interested, see [issue 14]. | click on `POWER` | `Ctrl`+`p` | | power on | _Right-click²_ | | turn device screen off (keep mirroring)| `Ctrl`+`o` | - | turn device screen on | `Ctrl`+`Shift`+`o` | | expand notification panel | `Ctrl`+`n` | | collapse notification panel | `Ctrl`+`Shift`+`n` | | copy device clipboard to computer | `Ctrl`+`c` | diff --git a/app/src/input_manager.c b/app/src/input_manager.c index 10a84e17..03f299db 100644 --- a/app/src/input_manager.c +++ b/app/src/input_manager.c @@ -282,11 +282,8 @@ input_manager_process_key(struct input_manager *input_manager, } return; case SDLK_o: - if (control && ctrl && !meta && down) { - enum screen_power_mode mode = shift - ? SCREEN_POWER_MODE_NORMAL - : SCREEN_POWER_MODE_OFF; - set_screen_power_mode(controller, mode); + if (control && ctrl && !shift && !meta && down) { + set_screen_power_mode(controller, SCREEN_POWER_MODE_OFF); } return; case SDLK_DOWN: diff --git a/app/src/main.c b/app/src/main.c index d8568884..2bdfb916 100644 --- a/app/src/main.c +++ b/app/src/main.c @@ -134,9 +134,6 @@ static void usage(const char *arg0) { " Ctrl+o\n" " turn device screen off (keep mirroring)\n" "\n" - " Ctrl+Shift+o\n" - " turn device screen on\n" - "\n" " Ctrl+n\n" " expand notification panel\n" "\n"