MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / CustomKeyDown

Function CustomKeyDown

source/binding/NodeJS/src/apis/callback.cpp:344–354  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342}
343
344MaaBool CustomKeyDown(int32_t keycode, void* trans_arg)
345{
346 auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg);
347 auto ctx = customCtx->callbacks["key_down"];
348 return ctx->Call<bool>([&](maajs::FunctionType func) {
349 return func.Call(
350 {
351 maajs::NumberType::New(func.Env(), keycode),
352 });
353 });
354}
355
356MaaBool CustomKeyUp(int32_t keycode, void* trans_arg)
357{

Callers

nothing calls this directly

Calls 2

CallMethod · 0.45
EnvMethod · 0.45

Tested by

no test coverage detected