title: $:/core/ui/ControlPanel/KeyboardShortcuts
tags: $:/tags/ControlPanel
caption: {{$:/language/ControlPanel/KeyboardShortcuts/Caption}}
\define lingo-base() $:/language/ControlPanel/KeyboardShortcuts/
\define new-shortcut(title)
\whitespace trim
<$edit-shortcut tiddler="$title$" placeholder={{$:/language/ControlPanel/KeyboardShortcuts/Add/Prompt}} focus="true" style="width:auto;"/>
<$button>
<>
<$action-listops
$tiddler="$(shortcutTitle)$"
$field="text"
$subfilter="[{$title$}]"
/>
<$action-deletetiddler
$tiddler="$title$"
/>
$button>
\end
\define shortcut-list-item(caption)
\whitespace trim
|
<>
|
<$button popup=< > class="tc-btn-invisible">
{{$:/core/images/edit-button}}
$button>
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts={{$(shortcutTitle)$}} prefix="" separator=" " suffix=""/>
<$reveal state=<> type="popup" position="below" animate="yes">
$reveal>
|
\end
\define shortcut-list(caption,prefix)
\whitespace trim
<$list filter="[[$prefix$$(shortcutName)$]]" variable="shortcutTitle">
<>
$list>
\end
\define shortcut-editor()
\whitespace trim
<>
<>
<>
<>
<>
<>
<>
\end
\define shortcut-preview()
<$macrocall $name="displayshortcuts" $output="text/html" shortcuts={{$(shortcutPrefix)$$(shortcutName)$}} prefix="" separator=" " suffix=""/>
\end
\define shortcut-item-inner()
\whitespace trim
<$reveal type="nomatch" state=<> text="open">
<$button class="tc-btn-invisible">
<$action-setfield
$tiddler=<>
$value="open"
/>
{{$:/core/images/right-arrow}}
$button>
$reveal>
<$reveal type="match" state=<> text="open">
<$button class="tc-btn-invisible">
<$action-setfield
$tiddler=<>
$value="close"
/>
{{$:/core/images/down-arrow}}
$button>
$reveal>
''<$text text=<>/>''
|
<$transclude tiddler="$:/config/ShortcutInfo/$(shortcutName)$"/>
|
<$list filter="$:/config/shortcuts/ $:/config/shortcuts-mac/ $:/config/shortcuts-not-mac/ $:/config/shortcuts-linux/ $:/config/shortcuts-not-linux/ $:/config/shortcuts-windows/ $:/config/shortcuts-not-windows/" variable="shortcutPrefix">
<>
$list>
|
<$set name="dropdownState" value={{$(dropdownStateTitle)$}}>
<$list filter="[match[open]]" variable="listItem">
<>
$list>
$set>
\end
\define shortcut-item()
\whitespace trim
<$set name="dropdownStateTitle" value=<>>
<>
$set>
\end
\whitespace trim
<$list filter="[all[shadows+tiddlers]removeprefix[$:/config/ShortcutInfo/]]" variable="shortcutName">
<>
$list>