mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
4da7869e70
* implement additional modifiers to xorg. * xorg modifiers to API. * update modifiers api & add ws. * scroll pos rename to delta and add ctrl key.
26 lines
602 B
Go
26 lines
602 B
Go
package handler
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/demodesk/neko/pkg/types"
|
|
"github.com/demodesk/neko/pkg/types/message"
|
|
)
|
|
|
|
func (h *MessageHandlerCtx) keyboardMap(session types.Session, payload *message.KeyboardMap) error {
|
|
if !session.IsHost() {
|
|
return errors.New("is not the host")
|
|
}
|
|
|
|
return h.desktop.SetKeyboardMap(payload.KeyboardMap)
|
|
}
|
|
|
|
func (h *MessageHandlerCtx) keyboardModifiers(session types.Session, payload *message.KeyboardModifiers) error {
|
|
if !session.IsHost() {
|
|
return errors.New("is not the host")
|
|
}
|
|
|
|
h.desktop.SetKeyboardModifiers(payload.KeyboardModifiers)
|
|
return nil
|
|
}
|