Newer
Older
labs / tiddlers / system / macros / $__ou_macros_MenuKeys.tid
created: 20200703065308466
modified: 20200703103856073
tags: $:/tags/Macro
title: $:/ou/macros/MenuKeys
type: text/vnd.tiddlywiki

\define keys(path)
<$list filter="[[$path$]split[>]trim[]first[]]">
<kbd><<currentTiddler>></kbd>
</$list>
<$list filter="[[$path$]split[>]trim[]rest[]]">
&#x1690;&nbsp;<kbd><<currentTiddler>></kbd>
</$list>
\end

\define menu(path)
<$list filter="[[$path$]split[>]trim[]first[]]">
<kbd><<currentTiddler>></kbd>
</$list>
<$list filter="[[$path$]split[>]trim[]rest[]]">
&#x276D;&nbsp;<kbd><<currentTiddler>></kbd>
</$list>
\end

\define path(path)
<kbd><span>{{$:/core/images/folder}} $path$</span></kbd>
\end


!Usage:

!!UI navigation 
```
<<menu "File > New File > Blob" >>
```
<<menu "File > New File > Blob" >>

!! Keyboard shortcuts
```
<<keys "Ctrl > Alt > 7" >>
```
<<keys "Ctrl > Alt > 7" >>

!! Paths
```
<<path "Documents/Projects" >>
```
<<path "Documents/Projects" >>

You can use both forward and back slashes, and colons in the path, so can represent file paths in all operating systems:

<<path "/home/bob/Documents/file.txt">>
<<path "H:\Documents\file.txt">>