mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-30 08:41:15 +00:00
LibGUI: Add a new constructor to Action
This constructor allows you to omit the modifier keys. Instead of doing "{ 0, Key_F5 }" you can now just do "Key_F5"
This commit is contained in:
parent
3e6a5af32b
commit
b05078b610
Notes:
sideshowbarker
2024-07-18 11:33:47 +09:00
Author: https://github.com/aatosmajava Commit: https://github.com/SerenityOS/serenity/commit/b05078b610c Pull-request: https://github.com/SerenityOS/serenity/pull/8230 Reviewed-by: https://github.com/MaxWipfli
|
@ -19,6 +19,11 @@ public:
|
|||
, m_key(key)
|
||||
{
|
||||
}
|
||||
Shortcut(KeyCode key)
|
||||
: m_modifiers(0)
|
||||
, m_key(key)
|
||||
{
|
||||
}
|
||||
|
||||
bool is_valid() const { return m_key != KeyCode::Key_Invalid; }
|
||||
u8 modifiers() const { return m_modifiers; }
|
||||
|
|
Loading…
Reference in a new issue