Page 1 sur 1

[zsh] Touche suppr ne fonctionne pas (résolu)

Publié : ven. 12 avr. 2013, 18:11
par nsvir
Bonjours,

Je suis un ancien bash user qui veut essayer zsh.
Je venais de finir de le configurer quand je me suis rendu compte que:
La touche 'suppr' ne fonctionnait pas xD
Il m'afffiche un '~' qui correspond au caractère d'une touche non reconnu
parce que si je fait 'pause' ou 'attn' il m'affiche aussi un '~'

Quelqu'un aurait une idée pour que mon zsh récupérer son 'suppr' ? :D

Merci d'avance!

Re: [zsh] Touche suppr ne fonctionne pas

Publié : ven. 12 avr. 2013, 18:37
par cdemoulins
Perso, j'ai plein de «bindkey» pour gérer les différents émulateurs de terminaux :

Code : Tout sélectionner

# Keybindings {{{
    bindkey -e

    bindkey '^A'    beginning-of-line    # Home
    bindkey '^E'    end-of-line          # End
    bindkey '^D'    delete-char          # Del
    bindkey '^[[1~' beginning-of-line    # Home
    bindkey '^[[3~' delete-char          # Del
    bindkey '^[[4~' end-of-line          # End
    bindkey '^[[5~' up-line-or-history   # Page  Up
    bindkey '^[[6~' down-line-or-history # Page  Down
    bindkey "^[[7~" beginning-of-line    # Home
    bindkey "^[[8~" end-of-line          # End
    bindkey "^[OH"  beginning-of-line
    bindkey "^[OF"  end-of-line
    bindkey "^[[H"  beginning-of-line
    bindkey "^[[F"  end-of-line

    bindkey '^[[A'  up-line-or-search    # Up
    bindkey '^[[D'  backward-char        # Left
    bindkey '^[[B'  down-line-or-search  # Down
    bindkey '^[[C'  forward-char         # Right

    bindkey '^r'    history-incremental-search-backward # CTRL-R - Recherche dans l'historique
    bindkey '#'    pound-insert
# }}}
Pour info, pour connaitre le «code» d'une touche qui est envoyé par le terminal, tu fais ctrl-v + la_touche.
Par exemple, pour la touche suppr dans urxvt j'obtiens '^[[3^'.

Re: [zsh] Touche suppr ne fonctionne pas

Publié : ven. 12 avr. 2013, 21:30
par nsvir
Ca marche parfaitement!
Merci beaucoup.

Petite question en passant:
"end-of-line" et compagnie sont des commandes.
Mais comment je peux en trouver d'autre ?

Re: [zsh] Touche suppr ne fonctionne pas (résolut)

Publié : ven. 12 avr. 2013, 23:55
par cdemoulins
Tu trouveras ça dans la page de man «zshzle». Zsh appel ça des widgets.