Skip to content

Commit b9cc3d4

Browse files
committed
Add hack-zone UI REPL access via ctl-u
1 parent 0781983 commit b9cc3d4

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

piker/ui/_interaction.py

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979

8080
async def handle_viewmode_kb_inputs(
8181

82-
view: 'ChartView',
82+
view: ChartView,
8383
recv_chan: trio.abc.ReceiveChannel,
8484

8585
) -> None:
@@ -148,6 +148,20 @@ async def handle_viewmode_kb_inputs(
148148
if mods == Qt.ControlModifier:
149149
ctrl = True
150150

151+
# UI REPL-shell
152+
if (
153+
ctrl and key in {
154+
Qt.Key_U,
155+
}
156+
):
157+
import tractor
158+
god = order_mode.godw
159+
feed = order_mode.feed
160+
chart = order_mode.chart
161+
vlm_chart = chart.linked.subplots['volume']
162+
dvlm_pi = vlm_chart._vizs['dolla_vlm'].plot
163+
await tractor.breakpoint()
164+
151165
# SEARCH MODE #
152166
# ctlr-<space>/<l> for "lookup", "search" -> open search tree
153167
if (
@@ -319,7 +333,7 @@ async def handle_viewmode_kb_inputs(
319333

320334
async def handle_viewmode_mouse(
321335

322-
view: 'ChartView',
336+
view: ChartView,
323337
recv_chan: trio.abc.ReceiveChannel,
324338

325339
) -> None:

0 commit comments

Comments
 (0)