added input device handling via FFI, still incomplete