while not completely fixed, this is a trial on getting setKeyEnabled() less ugly and make api.cpp run clean
clean core files here