Hello!

This 
<https://tiddlywiki.com/prerelease/static/keyboard-driven-input%2520Macro.html> 
is 
the page that explains the keyboard-driven-input macro with all the 
possible parameters.
I tried to create a simple search box with a search popup for the results, 
but I don't understand exactly which parameters I need and which temp 
search tiddlers to use.

Is there a post/tiddler which explains how the search temp variables are 
used?

Also, if anyone has some examples of simple search boxes made with a 
keyboard-driven-input macro, could you please send me the link/code?

Thank you in advance.

Btw, this is my actual code (keyboard navigation doesn't work):

SEARCH BOX TIDDLER

<$set name="searchTiddler" value="$:/temp/advancedsearch">
  <div class="tc-sidebar-search topbar-search">
    <$macrocall $name="keyboard-driven-input"
      tiddler=<<searchTiddler>>
      tag="input"
      type="search"
      focus={{$:/config/Search/AutoFocus}}
      focusPopup="$:/state/popup/search-dropdown"
      class="tc-popup-handle"
      placeholder=""
      default=""
    />
    <$button tooltip={{$:/language/Buttons/AdvancedSearch/Hint}} 
aria-label={{$:/language/Buttons/AdvancedSearch/Caption}} 
class="tc-btn-invisible tc-page-controls">
      <$action-navigate $to="$:/AdvancedSearch"/>
      {{$:/core/images/advanced-search-button}}
    </$button>

    <$reveal tag="div" class="tc-block-dropdown-wrapper" 
state="$:/state/popup/search-dropdown" type="nomatch" text="" default="">
      <$list 
filter="[<searchTiddler>get[text]minlength{$:/config/Search/MinLength}limit[1]]"
 
emptyMessage="" variable="listItem">
        <div class="tc-block-dropdown tc-search-drop-down src-dropdown">
          {{$:/plugins/kebi/tiddlystudy/search/visualizer}}
        </div>
      </$list>
    </$reveal>
  </div>
</$set>

SEARCH RESULTS TIDDLER

\define search-text()
$(pattern)$(?i)
\end

<div class="tw-search-results">
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="pattern" value={{$:/temp/advancedsearch}}>
<$list filter="[regexp:title<search-text>limit[250]] -[has[parent]] 
-[is[system]] -[all[shadows]]">
{{!!title||$:/core/ui/ListItemTemplate}}
</$list>
</$set>
</$reveal>
<$reveal state="$:/temp/advancedsearch" type="nomatch" text="">
<$set name="pattern" value={{$:/temp/advancedsearch}}>
<$list filter="[regexp:text<search-text>!sort[created]limit[250]] 
-[is[system]] -[all[shadows]] -[is[image]]">
<hr>
{{!!title||$:/core/ui/ListItemTemplate}}
<$context term=<<pattern>>/>
</$list>
</$set>
</$reveal>
</div>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/7444642a-9658-4039-aecf-81878041494cn%40googlegroups.com.

Reply via email to