terminfo

Terminfo smkx and Application Cursor Keys vs Application keypad

妖精的绣舞 提交于 2019-12-10 15:09:34
问题 XTerm Control Sequences specifies the following key sequences: CSI ? 1 h → Application Cursor Keys (DECCKM) CSI ? 1 l → Normal Cursor Mode (DECOM) CSI ? 66 h → Application keypad (DECNKM) CSI ? 66 l → Numeric keypad (DECNKM) and the Terminfo Source Format has the following entry: Variable: keypad_xmit Capname: smkx Termcap: ks Description: Put terminal in "keypad-transmit" mode But the terminfo for xterm actually says smkx=\E[?1h\E= , which seems mixed up to me (smkx should affect the keypad,

Printing double-size characters with Ncurses

时光总嘲笑我的痴心妄想 提交于 2019-12-10 11:05:01
问题 Many terminal emulators (xterm, Konsole) support double-size characters. Ncurses does not support this and as far as I know, ncurses will not print escape characters (\033 will be unescaped and printed in clear text). Is it possible at all to print double-size characters in a ncurses application? 回答1: The "double-size" character capability you refer to is set by the following ANSI sequences (found here): ESC # 3 DEC double-height line, top half (DECDHL) ESC # 4 DEC double-height line, bottom

Change the escape sequence generated by xterm for key combinations

旧城冷巷雨未停 提交于 2019-12-08 06:24:02
问题 My goal is to set up a terminal in which a command-line interface program would behave as expected for the keyboard inputs (the program is written in xharbour originally for Windows but now I would like to port it to linux). I have chosen xterm to start with as it is simpler, no need for disabling default terminal key combinations. With putty most of the characters work out well and for those that don't I use autohotkey, an ahk script and that does the job. For example, for Ctrl+F1: ^F1:

How to implement proper mouse support in a terminal / terminfo entry?

余生长醉 提交于 2019-12-07 06:00:55
问题 I've implemented a terminal emulator and a corresponding terminfo entry that allows me to run ncurses programs like emacs , mc (midnight commander) or tig (git browser). I want to add mouse support to the terminal , most notably to position the cursor in emacs by clicking into the window. After a lot of googling and some help on stackoverflow I learned about the required terminfo fields (most notably kmous ) and control (e.g. \E[?1000h ) and "key" ( \E[M... ) sequences and implemented mouse

Change the escape sequence generated by xterm for key combinations

天大地大妈咪最大 提交于 2019-12-06 16:19:59
My goal is to set up a terminal in which a command-line interface program would behave as expected for the keyboard inputs (the program is written in xharbour originally for Windows but now I would like to port it to linux). I have chosen xterm to start with as it is simpler, no need for disabling default terminal key combinations. With putty most of the characters work out well and for those that don't I use autohotkey, an ahk script and that does the job. For example, for Ctrl+F1: ^F1::SendInput ^[O5P I tried and modified, recompiled the terminfo, changed it and changed the keyboard types

Printing double-size characters with Ncurses

ぐ巨炮叔叔 提交于 2019-12-06 06:34:34
Many terminal emulators (xterm, Konsole) support double-size characters . Ncurses does not support this and as far as I know, ncurses will not print escape characters (\033 will be unescaped and printed in clear text). Is it possible at all to print double-size characters in a ncurses application? The "double-size" character capability you refer to is set by the following ANSI sequences (found here ): ESC # 3 DEC double-height line, top half (DECDHL) ESC # 4 DEC double-height line, bottom half (DECDHL) The \e#3 attribute makes the terminal switch character sets to one which only contains the

How to implement proper mouse support in a terminal / terminfo entry?

梦想的初衷 提交于 2019-12-05 09:11:35
I've implemented a terminal emulator and a corresponding terminfo entry that allows me to run ncurses programs like emacs , mc (midnight commander) or tig (git browser). I want to add mouse support to the terminal , most notably to position the cursor in emacs by clicking into the window. After a lot of googling and some help on stackoverflow I learned about the required terminfo fields (most notably kmous ) and control (e.g. \E[?1000h ) and "key" ( \E[M... ) sequences and implemented mouse button events in my terminal. I've written a small ncurses program that goes something like this:

Why is terminfo[kcuu1] = '\EOA'?

北慕城南 提交于 2019-12-02 03:30:36
问题 From what I can tell reading terminfo(5) , kcuu1 should be the sequence that the terminal sends when the up arrow is pressed. I have never, ever seen that be anything other than ^[[A (speaking now about cat , messed up terminal settings, etc). So, given that the terminals I've used (rxvt, gnome-terminal, iTerm) all default to TERM=xterm, why isn't kcuu1 \E[A ? I see that cuu1 is \E[A , but (from the man page, again), that's the string that I should send to the terminal to move the cursor, not

Why is terminfo[kcuu1] = '\\EOA'?

老子叫甜甜 提交于 2019-12-02 02:23:56
From what I can tell reading terminfo(5) , kcuu1 should be the sequence that the terminal sends when the up arrow is pressed. I have never, ever seen that be anything other than ^[[A (speaking now about cat , messed up terminal settings, etc). So, given that the terminals I've used (rxvt, gnome-terminal, iTerm) all default to TERM=xterm, why isn't kcuu1 \E[A ? I see that cuu1 is \E[A , but (from the man page, again), that's the string that I should send to the terminal to move the cursor, not a string the terminal sends to me. BTW this is with OS X. melpomene Arrow and other special keys

tmux man-page search highlighting

狂风中的少年 提交于 2019-11-29 22:57:36
When I search in, for example, man ls while in a tmux session, the search strings don't appear highlighted - the page jumps down so that the search string is on the top line of the buffer, as expected, but it's not highlighted. Doing the same thing in the same shell while not in a tmux session results in highlighted search strings. I have no idea where to start looking to solve this. Any hints are appreciated. Based on Less Colors For Man Pages by Gen2ly , here is my man page and how to do it: Preview This is a shell, not a web page ! How to (optional) I'm using Tomorrow theme for Konsole