mirror of https://github.com/KLayout/klayout.git
Allowing use of arrow keys for move
This commit is contained in:
parent
15a5f7f7c2
commit
18ef4a12e2
|
|
@ -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
|
void
|
||||||
MoveService::show_toolbox (bool visible)
|
MoveService::show_toolbox (bool visible)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ private:
|
||||||
virtual bool mouse_release_event (const db::DPoint &p, unsigned int /*buttons*/, bool prio);
|
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 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 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 drag_cancel ();
|
||||||
virtual void deactivated ();
|
virtual void deactivated ();
|
||||||
void show_toolbox (bool visible);
|
void show_toolbox (bool visible);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue