| 354 | } |
| 355 | |
| 356 | MaaBool CustomKeyUp(int32_t keycode, void* trans_arg) |
| 357 | { |
| 358 | auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg); |
| 359 | auto ctx = customCtx->callbacks["key_up"]; |
| 360 | return ctx->Call<bool>([&](maajs::FunctionType func) { |
| 361 | return func.Call( |
| 362 | { |
| 363 | maajs::NumberType::New(func.Env(), keycode), |
| 364 | }); |
| 365 | }); |
| 366 | } |
| 367 | |
| 368 | MaaBool CustomScroll(int32_t dx, int32_t dy, void* trans_arg) |
| 369 | { |