Skip to content

Commit ba1916f

Browse files
committed
interpret shift-click on run button and update docs
1 parent c5de284 commit ba1916f

2 files changed

Lines changed: 18 additions & 10 deletions

File tree

docs/gui/launcher.rst

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ Editing and running commands
2727

2828
Enter the command you want to run by typing its name. If you want to start over,
2929
:kbd:`Ctrl`:kbd:`C` will clear the line. When you are happy with the command,
30-
hit :kbd:`Enter` to run it. Any output from the command will appear in the help
31-
area. If you want to run the command and close the dialog so you can get back to
32-
the game, use :kbd:`Shift`:kbd:`Enter` instead. The dialog also closes
33-
automatically if you run a command that brings up a new GUI screen. In those
34-
cases, the command output (if any) will appear in the DFHack terminal console.
30+
hit :kbd:`Enter` or click on the ``run`` button to run it. Any output from the
31+
command will appear in the help area. If you want to run the command and close
32+
the dialog so you can get back to the game, use :kbd:`Shift`:kbd:`Enter` or hold
33+
down the :kbd:`Shift` key and click on the ``run`` button instead. The dialog
34+
also closes automatically if you run a command that brings up a new GUI screen.
35+
In either case, if the launcher window doesn't come back up to show the command
36+
output, then the command output (if any) will appear in the DFHack terminal
37+
console.
3538

3639
Autocomplete
3740
------------
@@ -51,10 +54,10 @@ When you start ``gui/launcher`` without parameters, it shows some useful
5154
information in the help area about how to get started.
5255

5356
Once you have typed (or autocompleted) a word that matches a valid command, the
54-
help area shows the help for that command, including usage instructions. You can
55-
scroll the help text page by page by left/right clicking or with :kbd:`PgUp` and
56-
:kbd:`PgDn`. You can also scroll line by line with :kbd:`Ctrl`:kbd:`Up` and
57-
:kbd:`Ctrl`:kbd:`Down`.
57+
help area shows the help for that command, including usage instructions and
58+
examples. You can scroll the help text by half pages by left/right clicking or
59+
with :kbd:`PgUp` and :kbd:`PgDn`. You can also scroll line by line with
60+
:kbd:`Ctrl`:kbd:`Up` and :kbd:`Ctrl`:kbd:`Down`.
5861

5962
Command history
6063
---------------

gui/launcher.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,12 @@ function EditPanel:init()
188188
key='SELECT',
189189
label='run',
190190
on_activate=function()
191-
self.on_submit(self.subviews.editfield.text) end},
191+
if dfhack.internal.getModifiers().shift then
192+
self.on_submit2(self.subviews.editfield.text)
193+
else
194+
self.on_submit(self.subviews.editfield.text)
195+
end
196+
end},
192197
widgets.EditField{
193198
view_id='search',
194199
frame={l=13, t=3, r=1},

0 commit comments

Comments
 (0)