Opened 7 years ago
Closed 6 weeks ago
#5835 closed defect (implemented)
getstr() doesn't support the delete key
Reported by: | atagar | Owned by: | atagar |
---|---|---|---|
Priority: | Low | Milestone: | |
Component: | Core Tor/Nyx | Version: | |
Severity: | Normal | Keywords: | curses |
Cc: | Actual Points: | ||
Parent ID: | Points: | ||
Reviewer: | Sponsor: |
Description
Curses getstr prompts are dumb, and we need to teach it how to be a sane text editor. Arm's TextInputValidator class [1] supports the left/right arrows, home, end, and esc keys. We should add support there for the delete key too.
This should be easy...
- add a line here to log keycodes
- run arm, navigate to the interpretor panel, hit the delete key
- see in the log what the keycode is
- add a handler for that keycode to delete the next character
Another minor bug is that hitting backspace when at the start of the line deletes the first character.
[1] https://gitweb.torproject.org/arm.git/blob/HEAD:/src/util/textInput.py#l12
Child Tickets
Change History (2)
comment:1 Changed 3 years ago by
Keywords: | curses added |
---|---|
Severity: | → Normal |
Summary: | Arm getstr prompt doesn't support delete → getstr() doesn't support the delete key |
comment:2 Changed 6 weeks ago by
Resolution: | → implemented |
---|---|
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Done: https://gitweb.torproject.org/nyx.git/commit/?id=321eb30eb1f38eb16b94ead67ad21cf5e3930a48