From 9ce26cffc5c5f268558192e155032923519f7234 Mon Sep 17 00:00:00 2001 From: m1k1o Date: Sun, 21 Jun 2020 03:01:15 +0200 Subject: [PATCH] bug: bad args order. --- server/internal/websocket/control.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/internal/websocket/control.go b/server/internal/websocket/control.go index bdab4503..ec7f196f 100644 --- a/server/internal/websocket/control.go +++ b/server/internal/websocket/control.go @@ -128,14 +128,6 @@ func (h *MessageHandler) controlKeyboard(id string, session types.Session, paylo h.remote.SetKeyboard(*payload.Layout) } - // set caps lock - var CapsLock = 0 - if payload.CapsLock == nil { - CapsLock = -1 - } else if *payload.CapsLock { - CapsLock = 1 - } - // set num lock var NumLock = 0 if payload.NumLock == nil { @@ -144,6 +136,14 @@ func (h *MessageHandler) controlKeyboard(id string, session types.Session, paylo NumLock = 1 } + // set caps lock + var CapsLock = 0 + if payload.CapsLock == nil { + CapsLock = -1 + } else if *payload.CapsLock { + CapsLock = 1 + } + // set scroll lock var ScrollLock = 0 if payload.ScrollLock == nil { @@ -152,6 +152,6 @@ func (h *MessageHandler) controlKeyboard(id string, session types.Session, paylo ScrollLock = 1 } - h.remote.SetKeyboardModifiers(CapsLock, NumLock, ScrollLock) + h.remote.SetKeyboardModifiers(NumLock, CapsLock, ScrollLock) return nil }