From 613fa684910d8d2c5f5e40203ff66dcc2f72aa69 Mon Sep 17 00:00:00 2001 From: jackun Date: Sun, 17 May 2020 15:45:31 +0300 Subject: [PATCH] Use `+` as keybind delimiter --- README.md | 2 +- bin/MangoHud.conf | 4 ++-- src/overlay_params.cpp | 4 +++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 419739e7..87a2abfd 100644 --- a/README.md +++ b/README.md @@ -120,7 +120,7 @@ A partial list of parameters are below. See the config file for a complete list. | `offset_x` `offset_y` | Hud position offsets | | `no_display` | Hide the hud by default | | `toggle_hud=`
`toggle_logging=` | Modifiable toggle hotkeys. Default are F12 and F2, respectively. | -| `reload_cfg=` | Change keybind for reloading the config. Default = `Shift_L F4` | +| `reload_cfg=` | Change keybind for reloading the config. Default = `Shift_L+F4` | | `time`
`time_format=%T` | Displays local time. See [std::put_time](https://en.cppreference.com/w/cpp/io/manip/put_time) for formatting help. | | `gpu_color`
`gpu_color`
`vram_color`
`ram_color`
`io_color`
`engine_color`
`frametime_color`
`background_color`
`text_color`
`media_player_color` | Change default colors: `gpu_color=RRGGBB`| | `alpha` | Set the opacity of all text and frametime graph `0.0-1.0` | diff --git a/bin/MangoHud.conf b/bin/MangoHud.conf index 8a1203a7..1779ac16 100644 --- a/bin/MangoHud.conf +++ b/bin/MangoHud.conf @@ -103,9 +103,9 @@ background_alpha=0.5 ################## INTERACTION ################# ### Change toggle keybinds for the hud & logging -#toggle_hud=Shift_R F12 +#toggle_hud=Shift_R+F12 #toggle_logging=F2 -#reload_cfg=Shift_L F4 +#reload_cfg=Shift_L+F4 ################## LOG ################# diff --git a/src/overlay_params.cpp b/src/overlay_params.cpp index 9d9b256f..8f12e5cc 100644 --- a/src/overlay_params.cpp +++ b/src/overlay_params.cpp @@ -12,6 +12,7 @@ #include "overlay_params.h" #include "overlay.h" #include "config.h" +#include "string_utils.h" #include "mesa/util/os_socket.h" @@ -83,7 +84,8 @@ parse_string_to_keysym_vec(const char *str) { std::stringstream keyStrings(str); std::string ks; - while (std::getline(keyStrings, ks, ' ')) { + while (std::getline(keyStrings, ks, '+')) { + trim(ks); KeySym xk = g_x11->XStringToKeysym(ks.c_str()); if (xk) keys.push_back(xk);