local function exit_submap() hl.dispatch(hl.dsp.submap("reset")) end hl.define_submap("screenshot", function() hl.bind("y", function() hl.dispatch(hl.dsp.exec_cmd("dms screenshot --no-file")) exit_submap() end) hl.bind("c", function() hl.dispatch(hl.dsp.exec_cmd("dms screenshot")) exit_submap() end) hl.bind("s", function() hl.dispatch(hl.dsp.exec_cmd("dms screenshot --no-copy")) exit_submap() end) hl.bind("SHIFT + y", function() hl.dispatch(hl.dsp.exec_cmd("dms screenshot full --no-file")) exit_submap() end) hl.bind("SHIFT + c", function() hl.dispatch(hl.dsp.exec_cmd("dms screenshot full")) exit_submap() end) hl.bind("SHIFT + s", function() hl.dispatch(hl.dsp.exec_cmd("dms screenshot full --no-copy")) exit_submap() end) hl.bind("Escape", function() exit_submap() end) end)