Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hotkey (Shift+R) to call the markdown script #4470

Merged
merged 2 commits into from Apr 30, 2024

Conversation

glotov4
Copy link
Contributor

@glotov4 glotov4 commented Apr 15, 2024

@@ -25,6 +25,9 @@ keybinding add Ctrl-Shift-K gui/cp437-table
# customizable quick command list
keybinding add Ctrl-Shift-A gui/quickcmd

# save the description of a selected unit or item to the `/markdown_{YourWorldName}.md` file in the root game directory
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

starting a filename with a slash indicates that it will be saved in the root folder of the entire system, not the current directory. I'd remove that leading slash.

@@ -25,6 +25,9 @@ keybinding add Ctrl-Shift-K gui/cp437-table
# customizable quick command list
keybinding add Ctrl-Shift-A gui/quickcmd

# save the description of a selected unit or item to the `/markdown_{YourWorldName}.md` file in the root game directory
keybinding add Shift-R@dwarfmode/ViewSheets/UNIT|dwarfmode/ViewSheet markdown
Copy link
Member

@myk002 myk002 Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm vary wary about adding a binding to regular text keys. It can cause non-obvious problems with text entry. For example, it would prevent a squad from having a name with a capital R in it (or, if the key is allowed through, the player would export the item description every time they typed R):
image

I suggest Alt-R instead

dwarfmode/ViewSheet

I think this got truncated. This is supposed to be dwarfmode/ViewSheets/ITEM, right?

Also, please move this down to the dwarfmode section below.

@myk002
Copy link
Member

myk002 commented Apr 15, 2024

After reviewing DFHack/scripts#901, I think the answer is to use an overlay instead of a keybinding. Individual players can still set up a keybinding if they want custom parameters, though, and that should definitely still be documented in markdown.rst

data/init/dfhack.keybindings.init Outdated Show resolved Hide resolved
data/init/dfhack.keybindings.init Outdated Show resolved Hide resolved
@myk002 myk002 merged commit 741ee77 into DFHack:develop Apr 30, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants