From 25dbe60c778c8a2bd086693befc4bd97f3cd2e95 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 14 May 2021 08:25:32 -0400 Subject: [PATCH] Flip to ctrl-l to pop out search/list --- piker/ui/_interaction.py | 9 +++++---- piker/ui/order_mode.py | 2 ++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/piker/ui/_interaction.py b/piker/ui/_interaction.py index 4a9771e4..1f543c3e 100644 --- a/piker/ui/_interaction.py +++ b/piker/ui/_interaction.py @@ -724,7 +724,7 @@ class ChartView(ViewBox): self._key_active = False - def keyPressEvent(self, ev): + def keyPressEvent(self, ev: QtCore.QEvent) -> None: """ This routine should capture key presses in the current view box. @@ -759,10 +759,10 @@ class ChartView(ViewBox): if mods == QtCore.Qt.AltModifier: pass - # ctlr-k - if key == QtCore.Qt.Key_K and ctrl: + # ctlr-l for "lookup" -> open search / lists + if ctrl and key == QtCore.Qt.Key_L: search = self._chart._lc.chart_space.search - search.focus() + search.bar.focus() # esc if key == QtCore.Qt.Key_Escape or (ctrl and key == QtCore.Qt.Key_C): @@ -809,5 +809,6 @@ class ChartView(ViewBox): # elif ev.key() == QtCore.Qt.Key_Backspace: # self.scaleHistory(len(self.axHistory)) else: + # maybe propagate to parent widget ev.ignore() self._key_active = False diff --git a/piker/ui/order_mode.py b/piker/ui/order_mode.py index 07f2b281..22293efa 100644 --- a/piker/ui/order_mode.py +++ b/piker/ui/order_mode.py @@ -402,7 +402,9 @@ async def start_order_mode( # each clearing tick is responded individually elif resp in ('broker_filled',): + action = msg['action'] + # TODO: some kinda progress system order_mode.on_fill( oid,