Use `+` as keybind delimiter

pull/197/head
jackun 4 years ago
parent 22c25b6247
commit 613fa68491
No known key found for this signature in database
GPG Key ID: 119DB3F1D05A9ED3

@ -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=`<br>`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`<br>`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`<br>`gpu_color`<br>`vram_color`<br>`ram_color`<br>`io_color`<br>`engine_color`<br>`frametime_color`<br>`background_color`<br>`text_color`<br>`media_player_color` | Change default colors: `gpu_color=RRGGBB`|
| `alpha` | Set the opacity of all text and frametime graph `0.0-1.0` |

@ -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 #################

@ -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);

Loading…
Cancel
Save