ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "George V. Kouryachy" <george@altlinux.org>
To: devel@lists.altlinux.org
Subject: [devel] Xterm #21731 -- ^H или ^?
Date: Tue, 21 Sep 2010 12:43:16 +0400
Message-ID: <20100921084316.GA20379@imap.altlinux.org> (raw)

Привет всем.

Разгребая баги (да-да, меня не было в этой реальности quite a lot)
наткнулся вот на такую, доставшуюся мне по наследству вместе с XTerm.

https://bugzilla.altlinux.org/show_bug.cgi?id=21731

Обсуждение можно не читать, суть такая, что в Linux xterm почему-то
обязан при нажатии клавиши BackSpace возвращать не символ BackSpace
(^H), а Delete (^?).

Это прописано в terminfo (см infocmp xterm): соответственно, экранные
программы ожидают, что KBS будет ^?. Это устанавливается в терминальной
линии (см. stty -a). Один только xterm не желает с этим считаться, и по
умолчанию при нажатии на BaskSpace посылает BackSpace. Потому что так
делается во всём цивилизованном мире :).

Способы лечения.
1. Нажимать вместо BaskSpace Ctrl+BaskSpace :)
2. stty erase=^H
3. Ctrl+левая кнопка мыши -> BackArrow key (BS/DEL)
4. Перебить системный ресурс backArrowKey, чтобы всегда был ^?
   Потеряется совместимость с другими системами
5. Перебить системный ресурс backarrowKeyIsErase, чтобы при старте
   XTerm-а backarrow принимала значение, равное stty-му erase.
   Потеряется совместимость с другими системами, появится момент
   неопределённости

Лично я за последний вариант. Мало ли что. А если кому-то хочется, чтобы
Erase был всё-таки ^H, используйте xterm -tn xterm-color, для него в
terminfo kbs=^H. А stty делайте сами :).

У меня стоит в .zshrc: stty erase `echotc kb`

Если никто не против, я попатчу app-defaults/XTerm.

-- 
			George V. Kouryachy (aka Fr. Br. George)
			mailto:george at altlinux_org


             reply	other threads:[~2010-09-21  8:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21  8:43 George V. Kouryachy [this message]
2010-09-21  7:54 ` REAL
2010-09-21  8:02 ` REAL
2010-09-21 14:19 ` Sergey Vlasov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100921084316.GA20379@imap.altlinux.org \
    --to=george@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


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