#ifdef DEBUG #ifndef __DEBUG_CPP #define __DEBUG_CPP /** * @brief Prints value of pressed key in top left corner. * Additionally it can get offet to see more presses. * * @param _flags keypress flags. * @param _key char that we got. */ void debugKey(cursor::key _key) { static unsigned short offset = 0; cursor::savePosition(); cursor::setPosition(1, 1); // std::cout << " "; // clear debug corner :^) cursor::setPosition(offset++ * 4 + 1, 1); std::cout << "\033[31;1m"; // if control flag set if (_key.special != 0) std::cout << "^"; std::cout << int(_key.code); std::cout << "\033[0m"; cursor::restorePosition(); } #endif #endif