Hi all,

I often use the *kbd* tag for showing (keyboard) keys in my TiddlyWiki, 
like that:

<kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd>

Typing this a lot is no fun, so I made a macro:

\define key(text: "Shift") <kbd>$text$</kbd>

It can be used this way:

<<key Ctrl>>

Now I could call this macro two or three times for creating a key 
combination. But it's even easier with additional macros:

\define combo2(key1: "Ctrl", key2: "x") <kbd>$key1$</kbd>+<kbd>$key2$</kbd>

\define combo3(key1: "Ctrl", key2: "Shift", key3: "x") <kbd>$key1$<
/kbd>+<kbd>$key2$</kbd>+<kbd>$key3$</kbd>

So I can write:

<<combo3 Ctrl Shift A>>

which generates the key combination of my example at top.

Just for curiosity:
Is is possible to create a single macro that works for either one, two or 
three keys? 

Best regards,
Max

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/b911bfff-d0d6-4742-ba30-d6db438e5aea%40googlegroups.com.

Reply via email to