| 640 | //============================================================================// |
| 641 | |
| 642 | bool LuaHandle::KeyPress(bool taken, int key, int mods) { |
| 643 | BzfDisplay* dpy = getDisplay(); |
| 644 | if (dpy == NULL) { |
| 645 | return false; |
| 646 | } |
| 647 | |
| 648 | LUA_CALL_IN_CHECK(L, 3) |
| 649 | if (!PushCallIn(LUA_CI_KeyPress)) { |
| 650 | return false; // the call is not defined, do not take the event |
| 651 | } |
| 652 | |
| 653 | lua_pushboolean(L, taken); |
| 654 | lua_pushinteger(L, key); |
| 655 | lua_pushinteger(L, mods); |
| 656 | |
| 657 | if (!RunCallIn(LUA_CI_KeyPress, 3, 1)) { |
| 658 | return false; |
| 659 | } |
| 660 | |
| 661 | return PopBool(L, false); |
| 662 | } |
| 663 | |
| 664 | |
| 665 | bool LuaHandle::KeyRelease(bool taken, int key, int mods) { |
no test coverage detected