diff --git a/Userland/Libraries/LibGUI/Event.h b/Userland/Libraries/LibGUI/Event.h index 8a2b732773..86c5011142 100644 --- a/Userland/Libraries/LibGUI/Event.h +++ b/Userland/Libraries/LibGUI/Event.h @@ -346,6 +346,19 @@ public: String to_string() const; + bool is_arrow_key() const + { + switch (m_key) { + case KeyCode::Key_Up: + case KeyCode::Key_Down: + case KeyCode::Key_Left: + case KeyCode::Key_Right: + return true; + default: + return false; + } + } + private: friend class WindowServerConnection; KeyCode m_key { KeyCode::Key_Invalid };