我正在将鼠标支持添加到类似库的ncurses中我正在发送控制序列:
SET_ANY_EVENT_MOUSE (1003h)
但似乎腻子不支持它?
它确实支持SET_BTN_EVENT_MOUSE (1002h)
我尝试过的所有其他终端(xterm,vte base终端,iterm)工作正常。腻子是否还支持SET_ANY_EVENT_MOUSE
,我还必须启用其他功能吗?
您将如何调试这种控制序列?
我会看一下PuTTY的源代码,它位于Git存储库中。相关的地方在terminal.c
功能的toggle_mode
中。 switch / case语句按模式号排序:
case 1000: /* xterm mouse 1 (normal) */
term->xterm_mouse = state ? 1 : 0;
win_set_raw_mouse_mode(term->win, state);
break;
case 1002: /* xterm mouse 2 (inc. button drags) */
term->xterm_mouse = state ? 2 : 0;
win_set_raw_mouse_mode(term->win, state);
break;
case 1006: /* xterm extended mouse */
term->xterm_extended_mouse = state;
break;
case 1015: /* urxvt extended mouse */
term->urxvt_extended_mouse = state;
break;
case 1047:
并且正如您所看到的,它对1003
没有任何作用(日志也没有在任何地方提及它。
我已链接到源,但是主机目前未响应。但是,从本地副本中,我看到在此处添加了[[1002
功能:
commit 93101b5a716c3464789ecf5af6403c68559afa43
Author: Simon Tatham <[email protected]>
Date: Sun May 6 14:20:41 2001 +0000
Wez Furlong's patch to add xterm mouse reporting and proper mouse
wheel support.
[originally from svn r1097]
diff --git a/terminal.c b/terminal.c
所以这不是最近被忽视的问题。