Tiddlywiki Keyboard Navigation

814 views
Skip to first unread message

h0p3

unread,
Jul 20, 2018, 6:54:24 PM7/20/18
to tiddl...@googlegroups.com

Tiddlywiki is a major workspace for me (https://philosopher.life/). One problem that continues to only grow larger for me is navigation. I can build my wiki to make it easier to navigate in some respects, but physically navigating is a crucial problem when I have a ton of tiddlers open at the same time (I regularly do). Right now I navigate with: "ctrl+f," the "Open" tab, my own linking structures, the search bar, arrowkeys, pg up/down, and "Scroll Anywhere" (FF extension) accelerated middle click scrolling. I really want a way to navigate the wiki with just my keyboard.

What are the best practice methods for navigating Tiddlywiki with a keyboard? Is there any way to achieve the following?

  • Change the target tiddler by stepping up and down one tiddler at time in my "Open" tab, even if they are already open (pg up/down don't work if the tiddler is open, as it steps through the text).
  • Open/edit a target tiddler
  • Initialize (and perhaps deinitialize) a cursor in the body of a target tiddler.
  • Spider around the sidebar and tabs.

This may be far too much to ask. I fully recognize you owe me nothing, and I'm very grateful for what I have. I'm just trying to improve the increasing friction in my workflow. The problem of navigation is at the point where I'm considering just building flat text/tid files (for which I can find effective keyboard navigation tooling) and compiling them into Tiddlywikis, but at that point, why use Tiddlywiki? I really want to keep my workspace as self-contained as possible.

Browser extensions, linux keyboard macro software, or anything you can think of is on the table for me. I'm reaching my ergonomic limits. Please, help me cast spells with my keyboard macros instead of my mouse.

Diego Mesa

unread,
Jul 20, 2018, 8:37:13 PM7/20/18
to TiddlyWiki
My DREAM is to have this all encompassing search-everything bar:


which would popup with ctrl+space, and from there I search, open, filter, etc. and have keyboard access to all of my tiddlers. 

I share your dream! I hope you know about the fantastic:


plugin! Its the closest thing we have! 

BurningTreeC

unread,
Jul 21, 2018, 2:07:16 AM7/21/18
to TiddlyWiki
Hi @h0p3,

as Diego mentioned above, the KeeBoord plugin lets you define your own keyboard shortcuts for tiddlywiki actions

I'm using it at http://muritest-reloaded.tiddlyspot.com for various actions if you want to take a look. The keyboard shortcuts are listed and editable in the ControlPanel's "Keyboard Shortcuts" Tab
 

Tiddlywiki is a major workspace for me (https://philosopher.life/). One problem that continues to only grow larger for me is navigation. I can build my wiki to make it easier to navigate in some respects, but physically navigating is a crucial problem when I have a ton of tiddlers open at the same time (I regularly do). Right now I navigate with: "ctrl+f," the "Open" tab, my own linking structures, the search bar, arrowkeys, pg up/down, and "Scroll Anywhere" (FF extension) accelerated middle click scrolling. I really want a way to navigate the wiki with just my keyboard.

What are the best practice methods for navigating Tiddlywiki with a keyboard? Is there any way to achieve the following?

  • Change the target tiddler by stepping up and down one tiddler at time in my "Open" tab, even if they are already open (pg up/down don't work if the tiddler is open, as it steps through the text).
  • Open/edit a target tiddler
  • Initialize (and perhaps deinitialize) a cursor in the body of a target tiddler.
I'm still searching a way to identify the target tiddler.
TiddlyWiki has its keyboard-shortcuts system that works within the text-editor but not outside. There, within the text-editor, the currently focused tiddler is defined, it's the tiddler where the cursor is...
The keyboard shortcuts provided by the keeboord plugin are not called from within tiddlers in the story river. They are "global" shortcuts.
Identifying the "target tiddler" is a problem that still needs to be solved: How can I know from outside, which tiddler is actually meant?
If that can be solved, these three points can easily be realized with keeboord. 
  • Spider around the sidebar and tabs.
That can be done with keeboord. I'll have a look and post an expample here. 

This may be far too much to ask. I fully recognize you owe me nothing, and I'm very grateful for what I have. I'm just trying to improve the increasing friction in my workflow. The problem of navigation is at the point where I'm considering just building flat text/tid files (for which I can find effective keyboard navigation tooling) and compiling them into Tiddlywikis, but at that point, why use Tiddlywiki? I really want to keep my workspace as self-contained as possible.

Browser extensions, linux keyboard macro software, or anything you can think of is on the table for me. I'm reaching my ergonomic limits. Please, help me cast spells with my keyboard macros instead of my mouse.


You're not the only one looking for this :)
Recently there have been more people asking for keyboard navigation... this thread could also be interesting for you

all the best,
BTC

TonyM

unread,
Jul 21, 2018, 3:13:02 AM7/21/18
to TiddlyWiki
HI on this,

Can keyborad shortcuts be assigned dynamically?

I can kind of imaging a list of tiddlers in their most recently 10 visited order on the side bar (not a tab). With keys line crtl-1 2 3 4 5 6 7 8 9 assigned to each
You could look at the list to see the number associated with a named tiddler and ctrl=n or if you know it was the last you edited ctrl-2 or third last etc...
Perhaps an alt-n for open in edit mode vs ctrl-n open in view mode.

Being on the side bar, if its always visible presumably the short cut key code is always rendered?

Regards
Tony

BurningTreeC

unread,
Jul 21, 2018, 5:06:43 AM7/21/18
to TiddlyWiki
HI on this,

Can keyborad shortcuts be assigned dynamically?

I can kind of imaging a list of tiddlers in their most recently 10 visited order on the side bar (not a tab). With keys line crtl-1 2 3 4 5 6 7 8 9 assigned to each
You could look at the list to see the number associated with a named tiddler and ctrl=n or if you know it was the last you edited ctrl-2 or third last etc...
Perhaps an alt-n for open in edit mode vs ctrl-n open in view mode.

Being on the side bar, if its always visible presumably the short cut key code is always rendered?

Regards
Tony


Yes that's easily doable Tony,
the keeboord plugin basically works this way:

1) create a tiddler and put whatever actions in it, tag it with "$:/tags/KeyboardShortcut" and give it a "key" field with the value ((my-action))
2) create the tiddler "$:/config/shortcuts/my-action" and put your keyboard shortcut in it
for 2) there's the easier way (to get the shortcut right) using a "$:/config/ShortcutInfo/my-action" tiddler. If you create that tiddler and save it, the action appears in the controlpanel under Keyvoard shortcuts and you can assign your shortcut there

BTC

h0p3

unread,
Jul 21, 2018, 3:45:33 PM7/21/18
to tiddl...@googlegroups.com
@ Diego Mesa

Your dream (:P) searchbar is incredibly sexy. Now I want everything! Thank you for pointing out the keyboord plugin!

@ BurningTreeC

I'll be interested to see your example. I've run into the local/global hotkey problem in TW before, but you clearly understand more about the problem than I do. I'm hoping this problem is solvable, but I'm worried it's not. Global shortcuts which don't have access to the state of the cursor will indeed be limited; I probably have missed something crucial here.

In a sense, this is about turning my browser into a portable self-contained terminal environment. If I can't, then I will have two modes of editing my wiki. One from CLI and another from within Tiddlywiki. The NPM tool might not be meant for this (imho). It feels like I'd need two sets of books, the individual tid flatfile anthology/book and the .html book. I'd need a way to real-time update between the two (which is going to have its own set of weird problems).

Does anyone else spend a lot of time editing their wiki in command line? Please, tell me your secrets!

Diego Mesa

unread,
Jul 21, 2018, 5:01:11 PM7/21/18
to TiddlyWiki
Hey h0p3,

I actually do a lot of editing of tid files from the CLI. Whenever I drop a PDF file into a folder, a new tid file is created with the name of the PDF, some tags, etc. and is opened in my text editor. I can fill it out, save it and move on. Later on, I can restart my TW and it loads up all my new tiddlers.

In the newest version I think we wont have to restart it anymore. 

h0p3

unread,
Jul 21, 2018, 6:38:56 PM7/21/18
to tiddl...@googlegroups.com
Hey Diego,

I'm kind of absent-minded sometimes, but I owe you a debt of gratitude. Thank you for helping me reason about this tool. You helped me think about how to do this from the command line last December:


The "restart" issue was a dealbreaker for me. When will the newest version come out (or is the current newest what you mean?)? Bouncing between CLI and Browser would need to be seamless. I ended up going back to the browser to do my work, but I'm beginning to see I may have no choice if I wish to make serious progress on this front.

I prefer my edits to go out nearly real-time, and I was hoping to serve the entire wiki in a single .html file. Unfortunately, minutely compilation is a burden (I basically lose a core to do it). I may eventually move away from serving the entire wiki as a single html file though (it's 17MB, and 6MB after compression). What does decent-to-high performance Tiddlywiki http service look like? I'm thinking about using Hugo if I go this direction.

BurningTreeC

unread,
Jul 22, 2018, 12:40:21 AM7/22/18
to tiddl...@googlegroups.com
@ Diego Mesa

Your dream (:P) searchbar is incredibly sexy. Now I want everything! Thank you for pointing out the keyboord plugin!

At http://j.d.spartan.tiddlyspot.com/ @JD has already made such a search bar, accessible by ctrl-Space
 
 

@ BurningTreeC

I'll be interested to see your example. I've run into the local/global hotkey problem in TW before, but you clearly understand more about the problem than I do. I'm hoping this problem is solvable, but I'm worried it's not. Global shortcuts which don't have access to the state of the cursor will indeed be limited; I probably have missed something crucial here.

In a sense, this is about turning my browser into a portable self-contained terminal environment. If I can't, then I will have two modes of editing my wiki. One from CLI and another from within Tiddlywiki. The NPM tool might not be meant for this (imho). It feels like I'd need two sets of books, the individual tid flatfile anthology/book and the .html book. I'd need a way to real-time update between the two (which is going to have its own set of weird problems).

Does anyone else spend a lot of time editing their wiki in command line? Please, tell me your secrets!

At http://muritest-reloaded.tiddlyspot.com I'm implementing keyboard navigation and keyboard modes, you can already test selecting tiddlers, editing and closing/cancelling by keyboard only
If a shortcut doesn't work for you, there's the "Keyboard Shortcuts" tab in the control panel where you can change shortcuts on the fly...

Try this:
alt-S : activates select-mode, where the left and right arrow keys navigate through the open tiddlers in the story river. Escape leaves select-mode. If select-mode is off, the arrow-keys and Escape have their previous functions

I have alt-shift-Equals and alt-shift-Dash for selecting tiddlers if select-mode is off ... I have a german keyboard so you might want to change these shortcuts

alt-E: edit the selected tiddler
alt-C: close the selected tiddler if it's not being edited, cancel editing if it is

These shortcuts also work in the other story views, try switching to classic with alt-shift-C... there's only the css missing at the moment
In muuri storyview I'm also tracking the clicks and drags on tiddlers, which sets the tiddlers active (highlighted by a darker shadow). This doesn't work in the other storyviews, but I'm sure it could be implemented...

There are more functions to come as I'm currently trying this out. I would welcome ideas to make this better if anyone is interested

BTC

BurningTreeC

unread,
Jul 23, 2018, 9:15:44 AM7/23/18
to TiddlyWiki
I found that I only need one Mode - I call it select mode.

I activate it using alt-S. When it activates it sets some keyboard shortcuts active (adds the tag $:/tags/KeyboardShortcut to the already created action-tiddlers ... leaving select-mode disables these shortcuts)
these keyboard shortcuts have single letters assigned: E for editing, C for closing/cancelling, D for deleting, Y for cloning tiddlers. These shortcuts automatically also leave select-mode.
Left/J/K navigates to the previous tiddler in the story river, Right/L/Backquote navigates to the next

I find this really handy and it works just with the keeboord plugin, no other dependencies needed
I think it'd be good to make the tiddler-edit-button leave edit-mode in case it's on, so that one can instantly start typing without having to press Escape first

If you like it, let me know what you think

BTC

BurningTreeC

unread,
Jul 23, 2018, 11:03:14 AM7/23/18
to TiddlyWiki
I forgot mentioning that this can be tested on http://muritest-reloaded.tiddlyspot.com 

h0p3

unread,
Jul 28, 2018, 10:23:57 PM7/28/18
to TiddlyWiki
Sorry I've taken so long to respond. This is outstanding! Love the demo.

I've tried importing all the right tiddlers necessary for select mode, but I have failed. I had something working, since I could push "Y" to get a new tiddler to come up, but it was definitely not functioning for me. Would you be so kind as to outline exactly what tiddlers I need to get for just the select mode? I will probably omit delete, since I'm not willing to make mistakes there (even with a nag screen). It is somewhat uncommon for me to clone a tiddler (but, I can guarantee I'm using Tiddlywiki all wrong in many respects). The ability to edit and close absolutely key to me though. I'm hoping that my sidebar will still follow me around during my navigation. 

RJ Skerry-Ryan

unread,
Jul 11, 2021, 11:50:41 PM7/11/21
to TiddlyWiki
Great work! Select mode works really well. It looks like a possible solution for the "focus tiddler", "navigate river with j/k" and "edit current selected tiddler" feature requests (related issues 1537980).

Is the code available for this anywhere? The demo for https://github.com/BurningTreeC/tiddlywiki-muuri doesn't seem to have this?

BurningTreeC

unread,
Jul 12, 2021, 3:38:44 AM7/12/21
to TiddlyWiki
Hello @Russel

Besides this "Select Mode" I've done many experiments to find a solution for the "focus tiddler" and over at GitHub we're currently discussing another approach
I've moved away from trying to implement a plugin on my own to trying to get something to the tiddlywiki core. But I think there's still a lot of work to do and help is needed

best wishes, BTC

RJ Skerry-Ryan

unread,
Jul 12, 2021, 11:08:02 AM7/12/21
to TiddlyWiki
Awesome, I love the work that you're doing and am so thankful. :) Having more stuff in core when it makes sense sounds great to me.

On Discord, saqimtiaz pointed me at tw5-keyboard-navigation-plugin which works really well for my navigation/editing by keyboard needs at the moment.



TW Tones

unread,
Jul 12, 2021, 10:35:36 PM7/12/21
to TiddlyWiki
BTC

I looked at your link for the "focus tiddler" and can find focus mentioned. And you are all too deep in the core. However I feel compelled to share this in case it helps.
{{$:/HistoryList!!current-tiddler}}  as long as you are using this $:/HistoryList the tiddler last navigated to or edited, becomes the value stored.
I expect a simple button on the current tiddler to navigate to itself can also set the "focus" on any tiddler desired with a click. Could this focusing a tiddler be used to do what you are after.

Regards
Tones
Reply all
Reply to author
Forward
0 new messages