You are not logged in.

#1 2023-11-29 23:02:06

b42
Member
Registered: 2023-07-20
Posts: 203

[SOLVED] Bind Shift or CTRL <Delete> to Mutt

I have bound <Delete> to delete-message in my muttrc

How do I bind Shift or CTRL + Del to undele-message?

or even better would be if its possible to make delete toggle-delete(un)delete-message?

Last edited by b42 (2023-12-01 20:28:05)

Offline

#2 2023-11-30 08:09:40

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,634

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

You wanted to explain the context and then you bind it the same way.
You can ":exec what-key" to query the key (ctrl+g to exit that) and you problem will likely be that cltr+del produces sth. like "~" in which case you'd have to alter the keyboard mapping of your TE, what is  very TE specific.

Online

#3 2023-11-30 19:08:58

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

seth wrote:

You wanted to explain the context and then you bind it the same way.
You can ":exec what-key" to query the key (ctrl+g to exit that) and you problem will likely be that cltr+del produces sth. like "~" in which case you'd have to alter the keyboard mapping of your TE, what is  very TE specific.

sorry Seth, it was late and I was really tired, forgot to mention the most important thing - I am referring to mutt configuration.

Offline

#4 2023-11-30 20:22:37

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,634

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

So what code is generated for ctrl+del and what terminal emulator do you use?

Online

#5 2023-11-30 21:34:03

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

what do you mean by what code is generated for ctrl+del?

I have the following line in my muttrc:

bind index <Delete> delete-message

I want to have

bind index CTRL+<Delete> undelete-message

My terminal emulator is suckless terminal

Offline

#6 2023-12-01 08:09:58

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,634

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

seth wrote:

You can ":exec what-key" to query the key (ctrl+g to exit that)

https://st.suckless.org/patches/fix_keyboard_input/ might help you with this.

Online

#7 2023-12-01 16:15:01

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

Do I get it right that in order for what I want to work, I first need to make appropriate changes to my suckless terminal build?

Offline

#8 2023-12-01 17:20:35

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,634

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

Most likely - what input does ctrl+del currently generate according to what-key?

Online

#9 2023-12-01 18:00:45

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

when I do

exec what-key

in my terminal it simply shuts it down

Offline

#10 2023-12-01 18:36:59

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,634

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

No, it tries to replace bash with a bogus porocess.
You run that in mutt.

Online

#11 2023-12-01 20:27:30

b42
Member
Registered: 2023-07-20
Posts: 203

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

It worked. The key was <F69>, I was able to bind it to my desired command. Thank you once again.

I am actually amazed of your vast knowledge, it seems like you know every single detail. How do you know all these things? Or are you a very experienced user of mutt?

Does :exec what-key works in other terminal-based programs as well?

Offline

#12 2023-12-01 22:10:31

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,634

Re: [SOLVED] Bind Shift or CTRL <Delete> to Mutt

what-key is a mutt feature, but you can run eg. "cat" in bash to get an idea what kind of input is produced there.

There're libraries full of things I don't know, but the things I know, I know because I've been around for a while.

Online

Board footer

Powered by FluxBB