Skip to content

Commit

Permalink
Add hack-zone UI REPL access via ctl-u
Browse files Browse the repository at this point in the history
  • Loading branch information
goodboy committed Feb 13, 2023
1 parent 515f6c7 commit 878ff06
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions piker/ui/_interaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@

async def handle_viewmode_kb_inputs(

view: 'ChartView',
view: ChartView,
recv_chan: trio.abc.ReceiveChannel,

) -> None:
Expand Down Expand Up @@ -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 (
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 878ff06

Please sign in to comment.