箭头键在腻子回来^ ^[[^[[D[[B,而不是移动光标

时间:2022-06-24 17:23:35

Has anyone else ever had this error in PuTTy?

有谁在腻子里犯过这个错误吗?

For example, pressing the Up Key now produces:

例如,按向上键现在产生:

>>> ^[[A

Google doesn't let you search for special characters so I'm stumped at finding existing version of this problem.

谷歌不允许您搜索特殊字符,所以我在寻找这个问题的现有版本时遇到了麻烦。


EDIT:

编辑:

So this happened after I pasted in some unicode (when, I think, the translation was already set to utf-8).

因此,这发生在我粘贴了一些unicode之后(我认为,当时的翻译已经被设置为utf-8)。

I've checked the Change Settings dialog box for different settings than my other open PuTTy windows, but the settings appear to be identical.

我在“更改设置”对话框中选择了与其他打开的PuTTy窗口不同的设置,但是设置似乎是相同的。

EDIT2:

EDIT2:

This is fixed by restarting PuTTy, but still a nuisance.

这是通过重新启动腻子修复的,但仍然是一个麻烦。

EDIT3:

EDIT3:

How to replicate the exact same bug:

如何复制相同的错误:

  1. Open a putty terminal to a linux PC (I'm using RedHat)
  2. 在linux PC上打开一个腻子终端(我用的是RedHat)
  3. Open Python 2.7.* - using the command python2.7 (note: error does not appear in 2.6)
  4. 开放的Python 2.7。* -使用命令python2.7(注意:在2.6中没有出现错误)
  5. import codecs
  6. 进口编解码器
  7. Now use the arrow keys, and these bizarre characters appear.
  8. 现在使用箭头键,这些奇怪的字符就会出现。

5 个解决方案

#1


111  

In my experience that's because "bash" is not running. Simply run "/bin/bash" to enjoy colors, history and more.

在我的经验中,因为“bash”没有运行。简单地运行“/bin/bash”来享受颜色、历史和更多。

#2


2  

You could try changing the 'Application Cursor Keys' mode. It's in the Terminal->Keyboard subsection of the initial configuration window (these settings may potenitally be overridden by your server).

您可以尝试更改“应用程序光标键”模式。它位于初始配置窗口的终端->键盘子部分(这些设置可能被服务器覆盖)。

http://the.earth.li/~sgtatham/putty/0.55/htmldoc/Chapter4.html#S4.4.4

http://the.earth.li/ sgtatham /腻子/ 0.55 / htmldoc / Chapter4.html # S4.4.4

#3


2  

I've found that specifying "The Function Keys and Keypad" option to match your operating system resolves many issues.

我发现指定“功能键和键盘”选项以匹配操作系统可以解决很多问题。

[Putty]

(油灰)

Terminal -> Keyboard --> RadioButton "Linux"

终端->键盘-> RadioButton "Linux"

(if you're using Linux) and then you can start your session

(如果你正在使用Linux)然后你可以开始你的会话

#4


1  

For those interested in the issue, had same simptoms in a virtualenvironment, resolved the issue with

对于那些对这个问题感兴趣的人来说,在虚拟环境中有相同的simptoms,可以用它来解决这个问题

pip install readlines

See following answer for details.

详见下面的答案。

#5


1  

Just run the simple bash command or sudo bash in ssh. It usually works.

只需在ssh中运行简单的bash命令或sudo bash。它通常的作品。

#1


111  

In my experience that's because "bash" is not running. Simply run "/bin/bash" to enjoy colors, history and more.

在我的经验中,因为“bash”没有运行。简单地运行“/bin/bash”来享受颜色、历史和更多。

#2


2  

You could try changing the 'Application Cursor Keys' mode. It's in the Terminal->Keyboard subsection of the initial configuration window (these settings may potenitally be overridden by your server).

您可以尝试更改“应用程序光标键”模式。它位于初始配置窗口的终端->键盘子部分(这些设置可能被服务器覆盖)。

http://the.earth.li/~sgtatham/putty/0.55/htmldoc/Chapter4.html#S4.4.4

http://the.earth.li/ sgtatham /腻子/ 0.55 / htmldoc / Chapter4.html # S4.4.4

#3


2  

I've found that specifying "The Function Keys and Keypad" option to match your operating system resolves many issues.

我发现指定“功能键和键盘”选项以匹配操作系统可以解决很多问题。

[Putty]

(油灰)

Terminal -> Keyboard --> RadioButton "Linux"

终端->键盘-> RadioButton "Linux"

(if you're using Linux) and then you can start your session

(如果你正在使用Linux)然后你可以开始你的会话

#4


1  

For those interested in the issue, had same simptoms in a virtualenvironment, resolved the issue with

对于那些对这个问题感兴趣的人来说,在虚拟环境中有相同的simptoms,可以用它来解决这个问题

pip install readlines

See following answer for details.

详见下面的答案。

#5


1  

Just run the simple bash command or sudo bash in ssh. It usually works.

只需在ssh中运行简单的bash命令或sudo bash。它通常的作品。