mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibGUI: Add GUI::KeyEvent::is_arrow_key()
This commit is contained in:
parent
d91732f959
commit
0d8373287c
Notes:
sideshowbarker
2024-07-18 02:01:04 +09:00
Author: https://github.com/awesomekling
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