Handle mouse events in key_to_str
This commit is contained in:
parent
c174ca62bd
commit
56b5300b9d
|
@ -100,6 +100,9 @@ KeyList parse_keys(StringView str)
|
|||
|
||||
String key_to_str(Key key)
|
||||
{
|
||||
if (key.modifiers & Key::Modifiers::MouseEvent)
|
||||
return "<mouse event>";
|
||||
|
||||
bool named = false;
|
||||
String res;
|
||||
auto it = find_if(keynamemap, [&key](const KeyAndName& item)
|
||||
|
|
|
@ -24,6 +24,8 @@ struct Key
|
|||
MousePos = 1 << 4,
|
||||
MouseWheelDown = 1 << 5,
|
||||
MouseWheelUp = 1 << 6,
|
||||
MouseEvent = MousePress | MouseRelease | MousePos |
|
||||
MouseWheelDown | MouseWheelUp,
|
||||
};
|
||||
enum NamedKey : Codepoint
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user