deadpixi / tine

tine - a modern clone of the AmigaDOS/TRIPOS ED display editor
GNU General Public License v3.0
60 stars 6 forks source link

Handle 0x7f as KEY_BACKSPACE #2

Closed rcabaco closed 4 years ago

rcabaco commented 4 years ago

On Mac the backspace key is mapped to DEL (0x7f) and ncurses does not handle it as a special key, which caused the sequence "^?" (stty erase) to be inserted in the text.

From my looking around this seems to be the way to handle this at an application level, that is, to map the DEL as KEY_BACKSPACE.

deadpixi commented 4 years ago

Hi @rcabaco

Thanks for the PR. Just out of curiosity, does

MC/?/H/

map the delete key how you want?

rcabaco commented 4 years ago

Yes.

Using Alt+Ctrl with ? or H acts like a backspace.

Is there a different way to map the backspace key besides the one I am using?

rcabaco commented 4 years ago

Sorry, earlier I did not really understand what you meant with MC/?/H.

I applied the command but it had no effect, this is, Ctrl+? does nothing.

deadpixi commented 4 years ago

Hi @rcabaco

Could you try running that command in tine's command-line?

In other words, do this:

Thank you. :)

deadpixi commented 4 years ago

Also, what does echo $TERM show? Thank you.

rcabaco commented 4 years ago

No, the backspace does not work after the command.

$ echo $TERM xterm

Let me know if you'd like me to do something else.

Thank you.