#pragma once #include #include "Mode.h" class ModeNav : public Mode { public: void reset() {} Mode * update(unsigned int keys) { if (keys & KEY_STAR) return Mode::modes[0]; /* arrow keys */ if (keys & KEY_2) Keyboard.write(KEY_UP_ARROW); if (keys & KEY_4) Keyboard.write(KEY_LEFT_ARROW); if (keys & KEY_5) Keyboard.write(KEY_DOWN_ARROW); if (keys & KEY_6) Keyboard.write(KEY_RIGHT_ARROW); if (keys & KEY_7) Keyboard.write(KEY_ESC); if (keys & KEY_8) Keyboard.write(KEY_TAB); if (keys & KEY_9) Keyboard.write(KEY_RETURN); if (keys & KEY_0) Keyboard.write(KEY_BACKSPACE); return NULL; } };