@@ -14,19 +14,19 @@ type InputRecord struct {
14
14
Type uint16
15
15
_ [2 ]byte // discard the next two bytes
16
16
17
- // Event contents can be one of :
18
- // KEY_EVENT (Type == 1)
19
- // - Event [0] is 0x1 if the key is pressed, 0x0 if the key is released
20
- // - Event [3] is the keycode of the pressed key, see
17
+ // Data contents are :
18
+ // If the event is a key event (Type == 1):
19
+ // - Data [0] is 0x1 if the key is pressed, 0x0 if the key is released
20
+ // - Data [3] is the keycode of the pressed key, see
21
21
// https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
22
- // - Event [5] is the ascii or Unicode keycode.
23
- // - Event [6] stores the state of the modifier keys.
22
+ // - Data [5] is the ascii or Unicode keycode.
23
+ // - Data [6] stores the state of the modifier keys.
24
24
// Original source: https://docs.microsoft.com/en-us/windows/console/key-event-record-str
25
25
//
26
- // WINDOW_BUFFER_SIZE_EVENT (TYPE == 4)
27
- // - Event [0] is the new amount of character rows
28
- // - Event [1] is the new amount of character columns
26
+ // If the event is a window buffer size event (Type == 4):
27
+ // - Data [0] is the new amount of character rows
28
+ // - Data [1] is the new amount of character columns
29
29
// Original source: https://docs.microsoft.com/en-us/windows/console/window-buffer-size-record-str
30
- Event [6 ]uint16
30
+ Data [6 ]uint16
31
31
}
32
32
0 commit comments