diff --git a/src/btop_input.cpp b/src/btop_input.cpp index fbbae58..6bfe9d8 100644 --- a/src/btop_input.cpp +++ b/src/btop_input.cpp @@ -41,6 +41,7 @@ namespace Input { //* Map for translating key codes to readable values const std::unordered_map Key_escapes = { {"\033", "escape"}, + {"\x12", "ctrl_r"}, {"\n", "enter"}, {" ", "space"}, {"\x7f", "backspace"}, @@ -258,8 +259,10 @@ namespace Input { Draw::calcSizes(); Runner::run("all", false, true); return; - } - else + } else if (is_in(key, "ctrl_r")) { + kill(getpid(), SIGUSR2); + return; + } else keep_going = true; if (not keep_going) return; diff --git a/src/btop_menu.cpp b/src/btop_menu.cpp index fb119aa..b7f44bc 100644 --- a/src/btop_menu.cpp +++ b/src/btop_menu.cpp @@ -177,6 +177,7 @@ namespace Menu { {"F2, o", "Shows options."}, {"F1, ?, h", "Shows this window."}, {"ctrl + z", "Sleep program and put in background."}, + {"ctrl + r", "Reloads config file from disk."}, {"q, ctrl + c", "Quits program."}, {"+, -", "Add/Subtract 100ms to/from update timer."}, {"Up, Down", "Select in process list."},