@BTC
 Your solution works great!
I have assigned Enter, Space, PageDown and Right-arror for next tiddler 
(slide) and Left-arrow, PageUp for previous.

There is some adjustment remained. For example, if I click on the 
next-slide button or previous-button, the state tiddler is not notified.
Also after slideshow, the next time state tiddler still has the last slide 
title and it should rewind.


Cheers
Mohammad



On Tuesday, June 5, 2018 at 10:56:57 PM UTC+4:30, BurningTreeC wrote:
>
> Hi again BTC
>>
>> If I use Zoomin storyview is this the correct code for defining shortcuts 
>> to navigate forward and backward through Tiddlers in story river
>>
>>
>>    - Goto next tiddler in story view with ctrl-N     
>>
>> <$navigator story="$:/StoryList" history="$:/HistoryList">
>> <$list filter="[all[current]next[$:/StoryList]]">
>> <$action-navigate $to=<<currentTiddler>> />
>> </$list>
>> </$navigator>
>>  tagged with:   $:/tags/KeyboardShortcut
>>
>>    - Goto previous tiddler in story view with ctrl-P
>>
>> <$navigator story="$:/StoryList" history="$:/HistoryList">
>> <$list filter="[all[current]previous[$:/StoryList]]">
>> <$action-navigate $to=<<currentTiddler>> />
>> </$list>
>> </$navigator>
>> tagged with:   $:/tags/KeyboardShortcut
>>
>> I have required tiddlers for description
>>
>>
>>    - $:/config/ShortcutInfo/next-tiddler           text: Next tiddler in 
>>    story river
>>    - $:/config/ShortcutInfo/previous-tiddler    text: Previous tiddler 
>>    in story river
>>
>>
> Hi Mohammad, there's a problem you need to work around: the currentTiddler 
> is not the same outside of the story river as within the story river (the 
> keyboard shortcuts are outside the story river)
> That's why [is[current]] in a keyboard shortcut will not match a tiddler 
> in the story river.
>
> The currentTiddler in the story river is defined through the list widget 
> in the $:/core/ui/PageTemplate/story Tiddler. You need a way to know 
> outside of the story river which one is the currently viewed tiddler to 
> make your idea work.
> The list widget in the story pagetemplate lists all tiddlers that are 
> listed in the $:/StoryList tiddler's list field:
>
> <$list filter="[list[$:/StoryList]]" .../>
>
> If you start a presentation, you could set the text of a state tiddler , 
> say $:/state/presentation-tiddler, to the title of the first tiddler in the 
> presentation
> When you go to the next Tiddler with your next button, you would set that 
> state tiddler to the next title (previous title for the previous button). 
> You would do the same in the keyboard shortcuts.
> Like that you should always have a reference which tiddler is shown.
>
> If you know the currently viewed tiddler you get the next from the 
> $:/StoryList with this filter:
>
> <$list filter="[{$:/state/presentation-tiddler}next[$:/StoryList]]" 
> variable="nextTiddler">
>
> the previous:
>
> <$list filter="[{$:/state/presentation-tiddler}previous[$:/StoryList]]" 
> variable="previousTiddler">
>
> I would add a check if we're at the beginning or the end of the story list:
>
> <$list filter="[list[$:/StoryList]count[]]" variable="storyCount">
> <$list filter="[list[$:/StoryList]nth<storyCount>
> !title{$:/state/presentation-tiddler}]">
> <$list filter="[{$:/state/presentation-tiddler}next[$:/StoryList]]" 
> variable="nextTiddler">
> <$action-setfield $tiddler="$:/state/presentation-tiddler" 
> text=<<nextTiddler>>/>
> <$action-navigate $to=<<nextTiddler>>/>
> </$list>
> </$list>
> </$list>
>
> Don't hesitate to ask if the how or why is unclear
>
> BTC
>

-- 
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 post to this group, send email to tiddlywiki@googlegroups.com.
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/b31c9957-e9a5-402e-b8fd-c09738cd20bd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to