mirror of https://github.com/jetkvm/kvm.git
add delay
This commit is contained in:
parent
024cbb8fb1
commit
d7c8abbb11
|
@ -1115,7 +1115,6 @@ func rpcKeyboardReportMulti(ctx context.Context, macro []hidrpc.KeyboardMacro) (
|
||||||
}
|
}
|
||||||
|
|
||||||
delay := time.Duration(step.Delay) * time.Millisecond
|
delay := time.Duration(step.Delay) * time.Millisecond
|
||||||
logger.Info().Int("step", i).Uint16("delay", step.Delay).Msg("Keyboard report multi delay")
|
|
||||||
|
|
||||||
last, err = rpcKeyboardReport(step.Modifier, step.Keys)
|
last, err = rpcKeyboardReport(step.Modifier, step.Keys)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -111,8 +111,8 @@ export default function useKeyboard() {
|
||||||
|
|
||||||
// If the step has keys and/or modifiers, press them and hold for the delay
|
// If the step has keys and/or modifiers, press them and hold for the delay
|
||||||
if (keyValues.length > 0 || modifierMask > 0) {
|
if (keyValues.length > 0 || modifierMask > 0) {
|
||||||
macro.push({ keys: keyValues, modifier: modifierMask, delay: 50 });
|
macro.push({ keys: keyValues, modifier: modifierMask, delay: 20 });
|
||||||
macro.push({ ...MACRO_RESET_KEYBOARD_STATE, delay: 200 });
|
macro.push({ ...MACRO_RESET_KEYBOARD_STATE, delay: 100 });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue