Skip to content

Commit

Permalink
#400 Update kvm-input-mode.md (update handshake)
Browse files Browse the repository at this point in the history
  • Loading branch information
o-sdn-o committed Jun 16, 2023
1 parent 73ee795 commit fe6b0b7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions doc/kvm-input-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,19 +59,15 @@ Handshake steps:
1. The terminal requests a new size.
2. Application must reply with the same message.
3. The terminal applies the new size and sends the changes.
4. Application must reply with the same message.

Between steps 2 and 4, the application must keep radio silence, as their output may be ignored by the terminal.
Note that the terminal window resizing always reflows the scrollback, so the viewport size, cursor position, scrolling regions, and selection coordinates are subject to change during step 3. In case the aplication's output is anchored to the current cursor position or uses scrolling regions, the application should wait after step 2 for the updated values before continuing to output.

```
Terminal: ESC [ # 0 ; WinSizeX ; WinSizeY _
Application: ESC [ # 0 ; WinSizeX ; WinSizeY _
Terminal: ESC [ # 1 ; CaretX ; CaretY ; WinSizeX ; WinSizeY ; ScrollTop ; ScrollBottom ; ScrollLeft ; ScrollRight ; SelStartX ; SelStartY ; SelEndX ; SelEndY ; SelMode ; CtrlState _
Application: ESC [ # 1 ; CaretX ; CaretY ; WinSizeX ; WinSizeY ; ScrollTop ; ScrollBottom ; ScrollLeft ; ScrollRight ; SelStartX ; SelStartY ; SelEndX ; SelEndY ; SelMode ; CtrlState _
```

Note that the terminal window resizing always reflows the scrollback, so the viewport size, cursor position, scrollable region margins, and selection coordinates are changed at step 3 of handshake.

Field | Description
---------------------------------------------|------------
`CaretX`<br>`CaretY` | Current text cursor position.
Expand Down

0 comments on commit fe6b0b7

Please sign in to comment.