![]() It is enabled by private mode 1004 (added to xterm in 2007, patch #224): CSI ? Pm h When the terminal gains focus, and CSI O when it loses focus. Only one can have focus there are protocols for establishing how to gain and lose focus in a graphical environment which it would not be helpful to explore.įrom the description (see also Tmux current pane indicator when focus regained), it appears that iTerm2 implements this xterm feature:įocusIn/FocusOut can be combined with any of the mouse events since it The term "focus" refers to which terminal (or window) is currently accepting keyboard and mouse input events. with alias focusfix='printf "\e[?1004l"') to make it more convenient to run manually. If you're concerned about your shell always generating that output, perhaps because you sometimes use it in places that don't handle those control codes well, or if the problem is sometimes triggered after the shell starts up, then you might prefer to set up an alias (e.g. There doesn't appear to be any harm (under XTerm at least) to sending the control code if the feature is already disabled, so it should be safe even if you only see this problem sometimes. I personally only see this problem if I've inadvertently dumped binary output to the terminal, but if you're encountering it more regularly you might want to add that printf to your shell's interactive startup script (e.g.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |