Add hack-zone UI REPL access via `ctl-u`

log_linearized_curve_overlays
Tyler Goodlet 2023-02-11 15:55:48 -05:00
parent a6d1053c50
commit cb5e2d48e2
1 changed files with 16 additions and 2 deletions

View File

@ -79,7 +79,7 @@ ORDER_MODE = {
async def handle_viewmode_kb_inputs(
view: 'ChartView',
view: ChartView,
recv_chan: trio.abc.ReceiveChannel,
) -> None:
@ -148,6 +148,20 @@ async def handle_viewmode_kb_inputs(
if mods == Qt.ControlModifier:
ctrl = True
# UI REPL-shell
if (
ctrl and key in {
Qt.Key_U,
}
):
import tractor
god = order_mode.godw
feed = order_mode.feed
chart = order_mode.chart
vlm_chart = chart.linked.subplots['volume']
dvlm_pi = vlm_chart._vizs['dolla_vlm'].plot
await tractor.breakpoint()
# SEARCH MODE #
# ctlr-<space>/<l> for "lookup", "search" -> open search tree
if (
@ -319,7 +333,7 @@ async def handle_viewmode_kb_inputs(
async def handle_viewmode_mouse(
view: 'ChartView',
view: ChartView,
recv_chan: trio.abc.ReceiveChannel,
) -> None: