vt100终端仿真器中的键盘传输模式 [英] keyboard transmit mode in vt100 terminal emulator

查看:450
本文介绍了vt100终端仿真器中的键盘传输模式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用javascript实现vt100终端仿真器,而vt100规范(来自man terminfoinfocmp)告诉我smkx=\E[?1h\E=是进入键盘发送模式的代码,而rmkx=\E[?1l\E>是进入代码的代码退出键盘发送"模式.我真的不明白什么是键盘传输模式.

I'm implementing a vt100 terminal emulator in javascript and the vt100 spec (from man terminfo and infocmp) tells me that smkx=\E[?1h\E= is the code to enter key-board transmit mode and rmkx=\E[?1l\E> is the code to leave 'key-board transmit' mode. I couldn't really understand what key-board transmit mode is.

来自 http://vt100.net/dec/ek-vt220-tm -001.pdf

7.4.4.1键盘传输模式-键盘代码和其他一些特殊代码是通过串行端口的串行线输出传输的. 8051.传输的信号从8051通过键盘电缆,显示器和视频电缆到达驱动器,再到达CPU.内含一个UART 8051控制变速箱"

7.4.4.1 Keyboard Transmit Mode -- The keyboard codes and a few other special codes are transmitted via a serial line output in PORT of the 8051. The transmitted signal goes from the 8051 to a driver, through the keyboard cable, monitor and video cable to the CPU. A UART within the 8051 controls the transmission"

我分别在进入和离开vim时得到了这些代码.我可以安全地忽略这些代码,还是需要处理它们?在后一种情况下,我该怎么办?

I'm getting these codes while entering into and leaving vim, respectively. Can I safely ignore these codes or do I need to handle them? In the latter case, what am I supposed to do?

推荐答案

这两个字符串分别包含两个序列;他们控制着微妙的不同事物:

These two strings contain two sequences each; they control subtly different things:

第一个,

CSI ? 1h
CSI ? 1l

控制DEC专用模式编号1,DECCKM,光标键模式.此模式确定四个箭头键(上,下,左,右)是否发送SS3或CSI前缀的序列.

controls DEC private mode number 1, DECCKM, cursor key mode. This mode determines whether the four arrow keys (Up, Down, Left, Right) will send SS3 or CSI-prefixed sequences.

第二对序列

ESC =
ESC >

称为DECKPAM(小键盘应用程序模式)和DECKPNM(小键盘数字模式).这样可以确定数字小键盘是发送控制序列还是普通数字(即,它类似于Numlock功能).

are called DECKPAM, keypad application mode, and DECKPNM, keypad numeric mode. This determines whether the number keypad sends control sequences, or normal numbers (i.e. consider it similar to the Numlock feature).

这篇关于vt100终端仿真器中的键盘传输模式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆