Delete characters with custom key bindings on the prompt buffer

I’m a little struggling with config to delete characters on the prompt buffer.

In input-edit mode, two useful functions, delete-forwards and delete-backwards, are provided.
However, I don’t think they are applicable to the prompt buffer.

Are there any alternative functions that can be used on the prompt buffer?
(I want to assign delete-forwards to C-d and delete-backwards to C-h.)

If not, is it possible to send different keycode when a key is pressed?
(Send delete when C-d is pressed, and send backspace when C-h is pressed for instance.)

OS: kali linux 2022.3 (kali-rolling)
Nyxt version: 2.2.4

What version of Nyxt are you using? I’m using the latest source, and I don’t even have input-edit-mode on for any buffer, and the delete-forwards C-d keybinding works by default. I’m not sure if there’s anything particularly “special” about keybindings in the prompt buffer, however…

Thank you for the reply.

I’m using ver.2.2.4 on kali linux 2022.3 (kali-rolling).
That sounds interesting input-edit-mode doesn’t exist anymore.

I knew about the mode when I asked this question in Github.

That sounds interesting input-edit-mode doesn’t exist anymore.

Pardon, let me clarify: I did not have the mode ENABLED in any buffer - the prompt-buffer doesn’t need it for C-d to execute delete-forwards. As I suspected, the prompt-buffer has its own keyscheme-map, you can see the defaults here. Ironically, the C-d binding calls out to input-edit-mode’s methods even if it’s not enabled…

Sorry, I misunderstood

Looking at the referenced code in prompt-buffer.lisp, some functions such as move-start-of-input and move-end-of-input aren’t provided in ver.2.2.4. I assume they are newly added in the latest version.

I’ll be considering using the 3.0 pre-release.