mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 03:37:45 +00:00
LibGUI: Add GUI::KeyEvent::is_arrow_key()
This commit is contained in:
parent
d91732f959
commit
0d8373287c
1 changed files with 13 additions and 0 deletions
|
@ -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 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue