Tíquete #46524

Allow to bind Ctrl+arrow keys

: 2023-01-16 10:27 Última Atualização: 2023-01-19 00:45

Relator:
Dono:
Estado:
Aberto [Owner assigned]
Componente:
Marcos:
(Nenhum)
Prioridade:
5 - Medium
Gravidade:
5 - Medium
Resolução:
Nenhum
Arquivo:
Nenhum
Vote
Score: 0
No votes
0.0% (0/0)
0.0% (0/0)

Details

I’d like to to bind Ctrl + Left/Right to backward/forward-emacsword, but I couldn’t figure out how. There’s no escape sequence for this key combination in lineedit, and it seems that ANSI escape sequences, such as ^[[1;5D and ^[[1;5C, are not supported…?

Ticket History (2/2 Histories)

2023-01-16 10:27 Updated by: jirutka
  • New Ticket "Allow to bind Ctrl+arrow keys" created
2023-01-19 00:45 Updated by: magicant
  • Dono Update from (Nenhum) to magicant
  • Componente Update from (Nenhum) to shell-lineedit
Comentário

Many terminals reserve the Ctrl-Arrow key for their own functions such as scrolling and window switching, and I don't think common terminfo databases define capabilities for the Ctrl-Arrow key. That means the current architecture of yash cannot support binding the Ctrl-Arrow key in the same way as other keys. But if you are sure that your terminal emits ^[[1;5D and ^[[1;5C for the Ctrl-Left/Right key, the following commands may help.

bindkey -e '\^[[1;5D' backward-emacsword
bindkey -e '\^[[1;5C' forward-emacsword

Attachment File List

No attachments

Editar

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Login