Hide Forgot
Description of problem: The nmuti TUI could be killed by using combinationkey. (ESC+one of the Arrow) Version-Release number of selected component (if applicable): rhel-server-7.2-x86_64-dvd.iso cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.2 (Maipo) How reproducible: Steps to Reproduce: 1.Install the OS with the iso 2.use nmtui tool to config the NIC 3.at any screen of this scrreen 4.Press the ESC and then any of the Arrow keys Actual results: Get me out of the nmtui Expected results: I may should still stay in the nmtui tool Additional info:
Steps to Reproduce: 1.Install the OS with the iso 2.use nmtui tool to config the NIC 3.at any step of these screen 4.Press the ESC and then any of the Arrow keys
nmtui registers a hotkey for ESCAPE in this way: newtFormAddHotKey (priv->form, NEWT_KEY_ESCAPE); but it seems that the newt library generates the same code for all unknown combinations as: ESC + letter ESC + arrow CTRL + arrow ... For all these, newtExitStruct.u.key has the value 27 (ESC), so there is no way nmtui can distinguish them from a real ESC press. Reassigning to newt component for analysis.
Terminals don't support escape as a key modifier and there is no special sequence for such combinations. From the application point of view, escape + arrow key is the same as pressing escape and then arrow key. For example in xterm escape+left emits ^[^[OD, which is the same as pressing them sequentially. To me it looks it's working as expected.
(In reply to Miroslav Lichvar from comment #4) > Terminals don't support escape as a key modifier and there is no special > sequence for such combinations. From the application point of view, escape + > arrow key is the same as pressing escape and then arrow key. For example in > xterm escape+left emits ^[^[OD, which is the same as pressing them > sequentially. For the key combinations containing ESC, your explanation makes perfectly sense to me. However I noticed that all these other combinations are also handled as ESC and make nmtui quit; is this correct? ALT + letter CTRL + (arrow, ins, canc, pg-up, pg-down, ...) CTRL + function keys For example, ALT+o emits ^[o which is \033o; that could be easily distinguished from ^[, no?
(In reply to Beniamino Galvani from comment #5) > For example, ALT+o emits ^[o which is \033o; that could be easily > distinguished from ^[, no? Yes, if the newt's database contained such escape sequence. There are no NEWT_KEY_* constants defined in newt.h for these combinations, so the header would have to be expanded too.