000-221 · Question #82
A user has found the keyboard backspace key will not delete text. How can the user set the keyboard backspace key to delete?
The correct answer is D. stty erase ^? The 'stty erase ^?' command maps the DEL character (ASCII 127) to the terminal erase function, restoring the Backspace key's ability to delete characters.
Question
A user has found the keyboard backspace key will not delete text. How can the user set the keyboard backspace key to delete?
Options
- Asplp-b
- BAdd "<key> Backspace" to user .profile and re-logon activate
- CExport LC_CTYPE=BackSpace variable and run command stty-s
- Dstty erase ^?
How the community answered
(26 responses)- A4% (1)
- B15% (4)
- C8% (2)
- D73% (19)
Why each option
The 'stty erase ^?' command maps the DEL character (ASCII 127) to the terminal erase function, restoring the Backspace key's ability to delete characters.
splp-b is not a valid Unix or AIX command and has no function related to terminal key configuration or backspace behavior.
There is no '<key> Backspace' directive recognized by the .profile initialization file - the shell profile does not process raw key-binding syntax of that form.
LC_CTYPE is a locale variable that controls character classification and encoding behavior, not terminal key mappings, and 'stty-s' is not valid stty syntax for reassigning the erase character.
The stty command configures terminal I/O parameters, and the 'erase' option specifies which input character triggers deletion of the preceding character. The notation '^?' represents the DEL character (ASCII 127, generated by Ctrl+?), which is the character most modern terminal emulators transmit when the physical Backspace key is pressed. Issuing 'stty erase ^?' correctly binds the Backspace key to the erase function so it deletes text as expected.
Concept tested: AIX stty erase command terminal key configuration
Source: https://www.ibm.com/docs/en/aix/7.3?topic=s-stty-command
Topics
Community Discussion
No community discussion yet for this question.