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

storage_cli
Tyler Goodlet 2023-02-11 15:55:48 -05:00
parent fd1fd8d49b
commit 7f91cda899
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: