aboutsummaryrefslogtreecommitdiff
path: root/src/lua_interface.c
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2007-11-08 15:01:36 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2007-11-08 15:01:36 -0500
commit0853e00683b88605ba19598de2389bd391e0e9eb (patch)
treeca065f21dbc11e6a766cb8aeb1fd22ba05b81fc0 /src/lua_interface.c
parentf112c01cd195685b2dfa9758e9d34b4444fe4926 (diff)
downloadtextadept-0853e00683b88605ba19598de2389bd391e0e9eb.tar.gz
textadept-0853e00683b88605ba19598de2389bd391e0e9eb.zip
Moved GTK/GDK keypress mask logic from lua_interface.c to textadept.c.
Diffstat (limited to 'src/lua_interface.c')
-rw-r--r--src/lua_interface.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lua_interface.c b/src/lua_interface.c
index 7f757d0a..ba6de56d 100644
--- a/src/lua_interface.c
+++ b/src/lua_interface.c
@@ -428,12 +428,12 @@ bool l_handle_event(const char *s, const char *arg) {
return l_call_function(1, 1);
}
-bool l_handle_keypress(int keyval, GdkEventKey *event) {
+bool l_handle_keypress(int keyval, bool shift, bool control, bool alt) {
if (!l_is_ta_table_function("events", "keypress")) return false;
lua_pushinteger(lua, keyval);
- lua_pushboolean(lua, (event->state & GDK_SHIFT_MASK) > 0 ? 1 : 0);
- lua_pushboolean(lua, (event->state & GDK_CONTROL_MASK) > 0 ? 1 : 0);
- lua_pushboolean(lua, (event->state & GDK_MOD1_MASK) > 0 ? 1 : 0);
+ lua_pushboolean(lua, shift);
+ lua_pushboolean(lua, control);
+ lua_pushboolean(lua, alt);
return l_call_function(4, 1);
}