How to implement proper mouse support in a terminal / terminfo entry?
问题 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