mirror of
https://github.com/m1k1o/neko.git
synced 2024-07-24 14:40:50 +12:00
bug: bad args order.
This commit is contained in:
parent
2fbf1e9ca4
commit
9ce26cffc5
@ -128,14 +128,6 @@ func (h *MessageHandler) controlKeyboard(id string, session types.Session, paylo
|
|||||||
h.remote.SetKeyboard(*payload.Layout)
|
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
|
// set num lock
|
||||||
var NumLock = 0
|
var NumLock = 0
|
||||||
if payload.NumLock == nil {
|
if payload.NumLock == nil {
|
||||||
@ -144,6 +136,14 @@ func (h *MessageHandler) controlKeyboard(id string, session types.Session, paylo
|
|||||||
NumLock = 1
|
NumLock = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// set caps lock
|
||||||
|
var CapsLock = 0
|
||||||
|
if payload.CapsLock == nil {
|
||||||
|
CapsLock = -1
|
||||||
|
} else if *payload.CapsLock {
|
||||||
|
CapsLock = 1
|
||||||
|
}
|
||||||
|
|
||||||
// set scroll lock
|
// set scroll lock
|
||||||
var ScrollLock = 0
|
var ScrollLock = 0
|
||||||
if payload.ScrollLock == nil {
|
if payload.ScrollLock == nil {
|
||||||
@ -152,6 +152,6 @@ func (h *MessageHandler) controlKeyboard(id string, session types.Session, paylo
|
|||||||
ScrollLock = 1
|
ScrollLock = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
h.remote.SetKeyboardModifiers(CapsLock, NumLock, ScrollLock)
|
h.remote.SetKeyboardModifiers(NumLock, CapsLock, ScrollLock)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user