[Konsole-devel] Review Request 124898: Add new escape sequences for FocusLost and FocusGained events.

Gerhard Gappmeier gerhard.gappmeier at ascolab.com
Sun Aug 23 22:18:29 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124898/
-----------------------------------------------------------

Review request for Konsole.


Repository: konsole


Description
-------

This makes FocusLost and FocusGained events working in console based Vim
running in Konsole. The plugin https://github.com/sjl/vitality.vim is
necessary, though to convert these escape sequences into Vim autocmds.

Focus reporting is disabled by default and can be enabled using special
escape sequences:

Sequence     Description              Direction
-----------------------------------------------
<esc>[O      Focus gained            send
<esc>[I      Focus lost              send
<esc>[?1004h Enable focus reporting  recv
<esc>[?1004l Disable focus reporting recv

This is the same trick as used by iTerm2.
It uses the same escape sequences to make the Vitality plugin working
without a change.

Vim configuration for testing:
* Install the Vitality plugin
* Add this to your ~/.vimrc

    " Enable this to make Vitality working with Konsole
    let g:vitality_always_assume_iterm=1
    " test events
    augroup FocusTest
        autocmd!
        autocmd FocusGained * :echo("focus gained")
        autocmd FocusLost * :echo("focus lost")
    augroup end


Diffs
-----

  src/Emulation.h 52a34b4eeaee9eb71389f2987c5e84bf005d8bc2 
  src/Session.cpp 522f68ea90c21892831c541496b0b3425ea87c21 
  src/TerminalDisplay.h f0699e92b60b210d0d34d48aecb99b6405f8483a 
  src/TerminalDisplay.cpp 1c7b5153bda2c247d3f6aa789db46a6ca7dd30fd 
  src/Vt102Emulation.h 8d678e00b28b2d055e0f324367e0990a7c04e925 
  src/Vt102Emulation.cpp a5f19eb1a1660baf666920405b46a43da3c7266d 

Diff: https://git.reviewboard.kde.org/r/124898/diff/


Testing
-------


Thanks,

Gerhard Gappmeier

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20150823/61d868a8/attachment.html>


More information about the konsole-devel mailing list