>
> Follow-up question: I'd like to limit the scope of certain keyboard
> shortcuts to certain tiddlers only. Am I correct in saying that this would
> come down to encapsulating a keyboard shortcut definition within a list
> filter, like for instance [is[current]title[something]] would make the
> keyboard definition only available within a tiddler titles 'something'?
>
>
Sadly, it doesn't work that way. Currently there's no way to identify the
"current tiddler" from within a global keyboard shortcut by the
<<currentTiddler>> variable or [all[current]] etc.
The problem graphically looks like this:
HERE STARTS THE TIDDLYWIKI
here is my global keyboard shortcut. it starts and ends here. it has
access to variables defined above it (no user-defined variables, mostly
core-tiddlywiki stuff) or imported variables/macros (using \import or
<$importvariables>), but nothing below.
here starts the "visible" part of the tiddlywiki
here starts the story river. from here to the point where the
story river ends, the <<currentTiddler>> variable holds the title of each
visible tiddler
tiddler 1, currentTiddler="tiddler 1"
tiddler 2, currentTiddler="tiddler 2"
here the story river ends.
here ends the "visible" part of the tiddlywiki
HERE ENDS THE TIDDLYWIKI
That means, to do something on a single tiddler using a global keyboard
shortcut, we currently have to specify that tiddler title directly
There are some ideas how to "detect" the tiddler that's most probably the
currently viewed tiddler:
* using the dynaview plugin like in the dynaview demo (
https://tiddlywiki.com/plugins/tiddlywiki/dynaview/) and filtering the
visible tiddlers in the story-river, sorting them from top to bottom, using
only the first
* adding a mechanism to the core that sets a state-tiddler to the title
of the navigated tiddler, whenever a navigation occurs (we could transclude
that tiddler in global keyboard shortcuts)
... but we don't have anything useful implemented in the core at the moment
hope this helps
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/99e1b02d-b793-4b29-9aa3-f3f7f866c555%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.