mirror of
https://github.com/m1k1o/neko.git
synced 2025-06-05 04:13:03 +02:00
add new WS keyboard event
This commit is contained in:
parent
56bd6acf10
commit
6206fbbadd
7 changed files with 39 additions and 0 deletions
|
@ -119,3 +119,14 @@ func (h *MessageHandler) controlClipboard(id string, session types.Session, payl
|
|||
h.remote.WriteClipboard(payload.Text)
|
||||
return nil
|
||||
}
|
||||
|
||||
func (h *MessageHandler) controlKeyboard(id string, session types.Session, payload *message.Keyboard) error {
|
||||
// check if session is host
|
||||
if !h.sessions.IsHost(id) {
|
||||
h.logger.Debug().Str("id", id).Msg("is not the host")
|
||||
return nil
|
||||
}
|
||||
|
||||
h.remote.SetKeyboard(payload.Layout)
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue