Skip to content

Delete key doesn't work #1096

Open
Open

Description

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.

Activity

  1. redmosaic commented on Jun 14, 2019

    @redmosaic

    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

  2. redmosaic commented on Jun 14, 2019

    @redmosaic
  3. vaygr commented on Mar 26, 2024

    @vaygr

    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.

  4. Atemo-C commented on May 20, 2024

    @Atemo-C

    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"
  5. Andriamanitra commented on Oct 29, 2026

    @Andriamanitra
    Collaborator

    I'm not sure if anyone is still suffering from this issue but the tcell/v3 branch may help, it fixes a lot of similar issues:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions