| Summary: | nmtui exit by combination key (ESC + one of the Arrow Keys) | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | fine.fan <fine.fan> |
| Component: | newt | Assignee: | Miroslav Lichvar <mlichvar> |
| Status: | CLOSED NOTABUG | QA Contact: | BaseOS QE - Apps <qe-baseos-apps> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.2 | CC: | atragler, bgalvani, lrintel, mlichvar, rkhan, thaller |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-10-07 08:11:26 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
fine.fan
2016-10-06 02:16:53 UTC
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. |