mirror of
https://github.com/mt-mods/controls.git
synced 2024-11-08 08:03:47 +01:00
11 lines
475 B
Lua
11 lines
475 B
Lua
controls.register_on_press(function(player, key)
|
|
minetest.chat_send_all(player:get_player_name() .. " pressed " .. key)
|
|
end)
|
|
|
|
controls.register_on_hold(function(player, key, length)
|
|
minetest.chat_send_all(player:get_player_name() .. " held " .. key .. " for " .. length .. " seconds")
|
|
end)
|
|
|
|
controls.register_on_release(function(player, key, length)
|
|
minetest.chat_send_all(player:get_player_name() .. " released " .. key .. " after " .. length .. " seconds")
|
|
end) |