Added support for buttons (broken right now because of ctypes)