src/glinject/glinject.c
/*
 * Pushes a table of modifiers onto the Lua stack.
 * {
 * 	shift=true,
 * 	caps=true,
 * 	control=true,
 * 	alt=true
 * }
 */
Pushes a table of modifiers onto the Lua stack.
Pushes a table of modifiers onto the Lua stack .
void glinject_lua_pushkeyeventmodifiers(lua_State* L, XKeyEvent *event) {
	lua_createtable(L, 0, 4);
	lua_pushboolean(L, (event->state & ShiftMask) != 0);
	lua_setfield(L, -2, "shift");
	lua_pushboolean(L, (event->state & LockMask) != 0);
	lua_setfield(L, -2, "caps");
	lua_pushboolean(L, (event->state & ControlMask) != 0);
	lua_setfield(L, -2, "control");
	lua_pushboolean(L, (event->state & Mod1Mask) != 0);
	lua_setfield(L, -2, "alt");
}
void glinject_lua_pushkeyeventmodifiers ( lua_State * L , XKeyEvent * event ) { lua_createtable ( L , 0 , 4 ) ; lua_pushboolean ( L , ( event -> state & ShiftMask ) != 0 ) ; lua_setfield ( L , -2 , " " ) ; lua_pushboolean ( L , ( event -> state & LockMask ) != 0 ) ; lua_setfield ( L , -2 , " " ) ; lua_pushboolean ( L , ( event -> state & ControlMask ) != 0 ) ; lua_setfield ( L , -2 , " " ) ; lua_pushboolean ( L , ( event -> state & Mod1Mask ) != 0 ) ; lua_setfield ( L , -2 , " " ) ; }
Pushes a table of modifiers onto the Lua stack.
Pushes a table of modifiers onto the Lua stack .