micro icon indicating copy to clipboard operation
micro copied to clipboard

Delete key doesn't work

Open ghost opened this issue 7 years ago • 4 comments

Steps to reproduce

Open micro, write something, put the cursor at the start of the file, press the delete key

Expected behaviour

A character to the right of the cursor gets deleted

Actual behaviour

Nothing happens.

Possible cause:

Because of #1093 I had to set TERM=xterm-256color before launching micro, and the terminfo files of xterm-256color and st-256color probably differ, so this will be probably solved by resolving #1093 and setting TERM back to st-256color.

ghost avatar Apr 24 '18 05:04 ghost

I use st with TERM=st-256color and delete key doesn't work for me either. I suppose that it's because micro doesn't sent smkx code at start.

More info at https://git.suckless.org/st/file/FAQ.html

redmosaic avatar Jun 14 '19 19:06 redmosaic

I uploaded .tcelldb for st so you can use TERM=st-256color too. https://www.opendesktop.org/dl?file_id=1560542546&file_type=application/octet-stream&file_name=.tcelldb&file_size=3569&project_id=1157805

redmosaic avatar Jun 14 '19 19:06 redmosaic

With the latest stack and version of micro I get the P character inserted on every Delete key press.

The workaround is to add "\u001b[P": "Delete" to bindings config.

vaygr avatar Mar 26 '24 15:03 vaygr

The workaround is to add "\u001b[P": "Delete" to bindings config.

At this point, unfortunately, this workaround or a form of it will most likely be here forever. Thank you for this suggestion, though, for it makes everything work as expected.

I also added the following to make CTRL + Delete work properly, I hope it can help some:

"\u001b[M": "DeleteWordRight"

EDIT: And this one for CTRL + Backspace:

"\u001b[127;5u": "DeleteWordLeft"

Atemo-C avatar May 20 '24 22:05 Atemo-C