You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/vt-input-mode.md
+23-25Lines changed: 23 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ Existing approaches have the following drawbacks:
31
31
32
32
## Conventions
33
33
34
-
- We use HEX-form of the uint32 (IEEE-754 32-bit binary float, Little-Endian) for the floating point value representation.
34
+
- We use HEX-form of the uint32 for the 32-bit floating point value representation (IEEE-754 32-bit binary float, Little-Endian).
35
35
- Space characters are not used in sequence payloads and are only used for readability of the description.
36
36
- //todo: keyboard only: All unescaped symbols outside of this protocol should be treated as clipboard pasted data.
37
37
@@ -63,17 +63,15 @@ Sources | Events to track
63
63
`"clipboard"`| Clipboard.
64
64
`"window"` | Window size and selection.
65
65
`"system"` | System signals.
66
-
`""` | Empty string to set all event reporting off.
66
+
`""` | Set event reporting off.
67
67
68
68
/todo: keyboard only: Note: By enabling `vt-input-mode`, all current terminal modes are automatically saved (to be restored on exit) and switched to something like "raw" mode, in which input is available character by character, echoing is disabled, and all special processing of terminal input and output characters is disabled (except for `LF` to `CR+LF` conversion).
69
69
70
70
### Event format
71
71
72
-
The event signaling also uses APC `ESC _ <payload> ESC \` with an event-specific payload syntax.
73
-
74
-
The payload consists of a list of attributes in the following format:
72
+
The event signaling also uses APC `ESC _ <payload> ESC \` vt-sequences with the following payload format:
The full sequence is fired after every key press and key release. The sequence can contain a string generated by a keystroke as a set of codepoints: `C0 + ... + Cn`. ~~The string can be fragmented and delivered by multiple consecutive events.~~
@@ -362,17 +360,17 @@ Key ID | Name | Generic Name | Scan Code | Notes
`kbmods=<KeyMods>` | Keyboard modifiers (see Keyboard event).
372
-
`coor=<X>,<Y>` | Pixel-wise coordinates of the mouse pointer. Each coordinate is represented in the form of a floating point value of the sum of the integer coordinate of the cell in the terminal window grid and the relative offset within the cell in the range `[0.0f, 1.0f)`.
373
-
`buttons=<ButtonState>` | Mouse button state.
374
-
`scroll=<DeltaX>,<DeltaY>` | Integer values of low resolution horizontal and vertical scroll deltas in integer 1/1 units (one scroll line corresponds to a value of 1).
375
-
`finescroll=<DeltaX>,<DeltaY>`| Integer values of high resolution horizontal and vertical scroll deltas in integer 1/120 units (one scroll line corresponds to a value of 120).
368
+
`id=<ID>` | Device group id (unsigned integer value).
369
+
`kbmods=<KeyMods>` | Keyboard modifiers bit field (see Keyboard event).
370
+
`coor=<X>,<Y>` | Pixel-wise 32-bit floating point coordinates of the mouse pointer relative to the console's text cell grid. The integer part corresponds to the cell coordinates, and the fractional part corresponds to the normalized position within the cell. The pointer's screen pixel coordinates can be calculated by multiplying these floating point values by the cell size. Receiving a NaN value is a signal that the mouse has left the window or disconnected.
371
+
`buttons=<ButtonState>` | Mouse buttons bit field.
372
+
`iscroll=<DeltaX>,<DeltaY>`| Low-resolution integer horizontal and vertical scroll deltas (one scroll line corresponds to a value of 1). Low-resolution scroll deltas increase as the values of high-resolution deltas accumulate, and are zeroed when the scroll direction changes.
373
+
`fscroll=<DeltaX>,<DeltaY>` | High-resolution 32-bit floating-point horizontal and vertical scroll deltas (one scroll line corresponds to a value of 1.0f).
376
374
377
375
The mouse tracking event fires on any mouse activity, as well as on keyboard modifier changes.
378
376
@@ -393,12 +391,12 @@ Note: Mouse tracking will continue outside the terminal window as long as the mo
0 commit comments