Port the split-mode key handling idea from the mtr085 fork and adapt it to upstream mtr actions. This lets split mode use the same pause, resume, display, compact, MPLS, DNS, and scroll keys that the select loop already supports.
Ported-from: yvs2014/mtr085@
097bda215b79cac11b54a8a7baead218c1868b6c
Ported-from: yvs2014/mtr085@
c69b13656f921c00c85581cac23f5f2b438ca186
Original-author: yvs <VSYakovetsky@gmail.com>
return ActionQuit;
if (tolower(c) == 'r')
return ActionReset;
+ if (tolower(c) == 'p')
+ return ActionPause;
+ if (c == ' ')
+ return ActionResume;
+ if (tolower(c) == 'd')
+ return ActionDisplay;
+ if (tolower(c) == 'c')
+ return ActionCompact;
+ if (tolower(c) == 'e')
+ return ActionMPLS;
+ if (tolower(c) == 'n')
+ return ActionDNS;
+ if (c == '+')
+ return ActionScrollDown;
+ if (c == '-')
+ return ActionScrollUp;
return 0;
}