+--0 is nothing
+--1 is up
+--2 is down
+--4 is left
+--8 is right
+--16 is jump
+--32 is auxilary
+--64 is sneak
+--128 is left click
+--256 is right click
+
+--make the data from get_key_pressed usable
+--Thanks Thou shalt use my mods!
+function minetest.get_control_bits(player)
+ local input = player:get_key_pressed()
+ local input_table = {}
+ --iterate through the table using the highest value first
+ local keys = {"rightclick","leftclick","sneak","aux","jump","right","left","down","up"}
+ for index,data in pairs(keys) do
+ local modifier = math.pow(2, 9-index)
+ if input >= modifier then
+ input_table[data] = true
+ input = input - modifier
+ else
+ input_table[data] = false
+ end
+ end
+ return(input_table)
+end
+
+
+