[-- Attachment #1: Type: text/plain, Size: 835 bytes --] Hi All, If I use the following key bindings, it prints the corresponding key sequences in my terminal. Key BindingsByte Sequence page up [5~ page down [6~ ctrl + ins [2;5~ ctrl + home [1;5H ctrl + page up [5;5~ ctrl + page down [6;5~ ctrl + end [1;5F alt + ins [2;3~ alt + home [1;3H alt + page up [5;3~ alt + page down [6;3~ alt + end [1;3F alt + delete [3;3~ alt + ctrl + ins [2;7~ alt + ctrl + home [1;7H alt + ctrl + page up [5;7~ alt + ctrl + [age down [6;7~ The terminal looks like: [image: r/zsh - prints byte sequence when no key is bound to that key sequence] <https://preview.redd.it/he7h3upydhu51.png?width=856&format=png&auto=webp&s=76607c1ed7c58f54abe48aa489932a7256c8b515> I do not want to print these key sequences in the terminal when I press the keybindings. What can I do? *Thanks and Best Regards,Ahmad Ismail* [-- Attachment #2: Type: text/html, Size: 5051 bytes --]
[-- Attachment #1: Type: text/plain, Size: 429 bytes --] On Wed, Oct 21, 2020 at 10:21 AM Ahmad Ismail <ismail783@gmail.com> wrote: > > Key BindingsByte Sequence > page up [5~ > In every one of your examples, the "[" is supposed to be preceded by an ESC ($'\e', ^[, whatever) character. I can't tell if you've omitted the ESC from your original key binding or if it has been stripped out when you tried to paste this table into your email, but that's where you should start looking. [-- Attachment #2: Type: text/html, Size: 944 bytes --]
[-- Attachment #1: Type: text/plain, Size: 802 bytes --] Hi Bart Schaefer, After your suggestion, I found the main problem. It was: _escape-key () { zle autosuggest-clear # Escape To Clear Suggestion REGION_ACTIVE=0 # remove selection } zle -N _escape-key bindkey '\e' _escape-key *Thanks and Best Regards,Ahmad Ismail* On Thu, Oct 22, 2020 at 2:21 AM Bart Schaefer <schaefer@brasslantern.com> wrote: > On Wed, Oct 21, 2020 at 10:21 AM Ahmad Ismail <ismail783@gmail.com> wrote: > >> >> Key BindingsByte Sequence >> page up [5~ >> > > In every one of your examples, the "[" is supposed to be preceded by an > ESC ($'\e', ^[, whatever) character. I can't tell if you've omitted the > ESC from your original key binding or if it has been stripped out when you > tried to paste this table into your email, but that's where you should > start looking. > > [-- Attachment #2: Type: text/html, Size: 3273 bytes --]
On Thu, Oct 22, 2020 at 2:40 AM Ahmad Ismail <ismail783@gmail.com> wrote:
>
> After your suggestion, I found the main problem. It was:
>
> zle -N _escape-key
> bindkey '\e' _escape-key
Hm, that should not break multi-key sequences all by itself. Has
$KEYTIMEOUT been set to some very small value?
[-- Attachment #1: Type: text/plain, Size: 720 bytes --] Hi Bart Schaefer, Yes, you are right. I use `export KEYTIMEOUT=0`. The few things I use from ^x is bound to bindkey "^[OP" _complete_help # F1 bindkey "^[[1;5P" _complete_debug # Ctrl + F1 bindkey "^[[15;5~" execute-named-cmd # Ctrl + F5 to Run Widget I use ctrl+x to cut. *Thanks and Best Regards,Ahmad Ismail* On Fri, Oct 23, 2020 at 12:01 AM Bart Schaefer <schaefer@brasslantern.com> wrote: > On Thu, Oct 22, 2020 at 2:40 AM Ahmad Ismail <ismail783@gmail.com> wrote: > > > > After your suggestion, I found the main problem. It was: > > > > zle -N _escape-key > > bindkey '\e' _escape-key > > Hm, that should not break multi-key sequences all by itself. Has > $KEYTIMEOUT been set to some very small value? > [-- Attachment #2: Type: text/html, Size: 2893 bytes --]