| 330 | } |
| 331 | |
| 332 | MaaBool CustomInputText(const char* text, void* trans_arg) |
| 333 | { |
| 334 | auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg); |
| 335 | auto ctx = customCtx->callbacks["input_text"]; |
| 336 | return ctx->Call<bool>([&](maajs::FunctionType func) { |
| 337 | return func.Call( |
| 338 | { |
| 339 | maajs::StringType::New(func.Env(), text), |
| 340 | }); |
| 341 | }); |
| 342 | } |
| 343 | |
| 344 | MaaBool CustomKeyDown(int32_t keycode, void* trans_arg) |
| 345 | { |