vncserver: Correct rfb_keyevent_s definition

Refer to https://datatracker.ietf.org/doc/html/rfc6143,
size of key is 4 byte.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
This commit is contained in:
Huang Qi 2022-07-11 12:25:08 +08:00 committed by Xiang Xiao
parent 2192b8df2b
commit e23bcb0e81
2 changed files with 2 additions and 2 deletions

View File

@ -321,7 +321,7 @@ int vnc_receiver(FAR struct vnc_session_s *session)
/* Inject the key press/release event into NX */
keyevent = (FAR struct rfb_keyevent_s *)session->inbuf;
vnc_key_map(session, rfb_getbe16(keyevent->key),
vnc_key_map(session, rfb_getbe32(keyevent->key),
(bool)keyevent->down);
}
}

View File

@ -411,7 +411,7 @@ struct rfb_keyevent_s
uint8_t msgtype; /* U8 Message type */
uint8_t down; /* U8 Down flag */
uint8_t padding[2];
uint8_t key[2]; /* U16 Key */
uint8_t key[4]; /* U16 Key */
};
/* "The interpretation of keysyms is a complex area. In order to be as