mirror of
https://github.com/aristocratos/btop.git
synced 2026-06-11 09:14:22 -04:00
fix arrow keys that send 'O' instead of '['
Changing line in btop_input.cpp that compared first 2 characters of input to Fx::e. Instead it now compares first character of input to first character of Fx::e and checks that the length is greater then 1 This allows systems that send <ESC>OA and so on for the arrow keys instead of <ESC>[A
This commit is contained in:
committed by
Jakob P. Liljenberg
parent
a207f579c9
commit
83aa6ffed8
@@ -122,7 +122,7 @@ namespace Input {
|
||||
string key = input;
|
||||
if (not key.empty()) {
|
||||
//? Remove escape code prefix if present
|
||||
if (key.substr(0, 2) == Fx::e) {
|
||||
if (key.length() > 1 and key.at(0) == Fx::e.at(0)) {
|
||||
key.erase(0, 1);
|
||||
}
|
||||
//? Detect if input is an mouse event
|
||||
|
||||
Reference in New Issue
Block a user