Flip to ctrl-l to pop out search/list

symbol_search
Tyler Goodlet 2021-05-14 08:25:32 -04:00
parent 51c61587d2
commit 25dbe60c77
2 changed files with 7 additions and 4 deletions

View File

@ -724,7 +724,7 @@ class ChartView(ViewBox):
self._key_active = False 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. This routine should capture key presses in the current view box.
@ -759,10 +759,10 @@ class ChartView(ViewBox):
if mods == QtCore.Qt.AltModifier: if mods == QtCore.Qt.AltModifier:
pass pass
# ctlr-k # ctlr-l for "lookup" -> open search / lists
if key == QtCore.Qt.Key_K and ctrl: if ctrl and key == QtCore.Qt.Key_L:
search = self._chart._lc.chart_space.search search = self._chart._lc.chart_space.search
search.focus() search.bar.focus()
# esc # esc
if key == QtCore.Qt.Key_Escape or (ctrl and key == QtCore.Qt.Key_C): 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: # elif ev.key() == QtCore.Qt.Key_Backspace:
# self.scaleHistory(len(self.axHistory)) # self.scaleHistory(len(self.axHistory))
else: else:
# maybe propagate to parent widget
ev.ignore() ev.ignore()
self._key_active = False self._key_active = False

View File

@ -402,7 +402,9 @@ async def start_order_mode(
# each clearing tick is responded individually # each clearing tick is responded individually
elif resp in ('broker_filled',): elif resp in ('broker_filled',):
action = msg['action'] action = msg['action']
# TODO: some kinda progress system # TODO: some kinda progress system
order_mode.on_fill( order_mode.on_fill(
oid, oid,