zsh-users
 help / color / mirror / Atom feed
* prints byte sequence when no key is bound to that key sequence
@ 2020-10-21 17:21 Ahmad Ismail
  2020-10-21 20:20 ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Ahmad Ismail @ 2020-10-21 17:21 UTC (permalink / raw)
  To: Zsh Users

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: prints byte sequence when no key is bound to that key sequence
  2020-10-21 17:21 prints byte sequence when no key is bound to that key sequence Ahmad Ismail
@ 2020-10-21 20:20 ` Bart Schaefer
  2020-10-22  9:39   ` Ahmad Ismail
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2020-10-21 20:20 UTC (permalink / raw)
  To: Ahmad Ismail; +Cc: Zsh Users

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: prints byte sequence when no key is bound to that key sequence
  2020-10-21 20:20 ` Bart Schaefer
@ 2020-10-22  9:39   ` Ahmad Ismail
  2020-10-22 18:01     ` Bart Schaefer
  0 siblings, 1 reply; 5+ messages in thread
From: Ahmad Ismail @ 2020-10-22  9:39 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh Users

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: prints byte sequence when no key is bound to that key sequence
  2020-10-22  9:39   ` Ahmad Ismail
@ 2020-10-22 18:01     ` Bart Schaefer
  2020-10-24 18:43       ` Ahmad Ismail
  0 siblings, 1 reply; 5+ messages in thread
From: Bart Schaefer @ 2020-10-22 18:01 UTC (permalink / raw)
  To: Ahmad Ismail; +Cc: Zsh Users

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?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: prints byte sequence when no key is bound to that key sequence
  2020-10-22 18:01     ` Bart Schaefer
@ 2020-10-24 18:43       ` Ahmad Ismail
  0 siblings, 0 replies; 5+ messages in thread
From: Ahmad Ismail @ 2020-10-24 18:43 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: Zsh Users

[-- 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 --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-10-24 18:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-21 17:21 prints byte sequence when no key is bound to that key sequence Ahmad Ismail
2020-10-21 20:20 ` Bart Schaefer
2020-10-22  9:39   ` Ahmad Ismail
2020-10-22 18:01     ` Bart Schaefer
2020-10-24 18:43       ` Ahmad Ismail

zsh-users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ http://inbox.vuxu.org/zsh-users \
		zsh-users@zsh.org
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git