Allowing use of arrow keys for move

This commit is contained in:
Matthias Koefferlein 2026-01-13 09:21:41 +01:00
parent 15a5f7f7c2
commit 18ef4a12e2
2 changed files with 16 additions and 0 deletions

View File

@ -148,6 +148,21 @@ MoveService::key_event (unsigned int key, unsigned int buttons)
}
}
bool
MoveService::shortcut_override_event (unsigned int key, unsigned int buttons)
{
if (! m_dragging) {
if (int (key) == lay::KeyDown ||
int (key) == lay::KeyLeft ||
int (key) == lay::KeyUp ||
int (key) == lay::KeyRight) {
return true;
}
}
return lay::EditorServiceBase::shortcut_override_event (key, buttons);
}
void
MoveService::show_toolbox (bool visible)
{

View File

@ -55,6 +55,7 @@ private:
virtual bool mouse_release_event (const db::DPoint &p, unsigned int /*buttons*/, bool prio);
virtual bool wheel_event (int delta, bool horizontal, const db::DPoint &p, unsigned int buttons, bool prio);
virtual bool key_event (unsigned int key, unsigned int buttons);
virtual bool shortcut_override_event (unsigned int key, unsigned int buttons);
virtual void drag_cancel ();
virtual void deactivated ();
void show_toolbox (bool visible);