welford / twmousetrap

a port of http://craig.is/killing/mice for tiddlywiki5
2 stars 0 forks source link

Button Linking and Creating New Tiddlers #2

Open RichShumaker opened 9 years ago

RichShumaker commented 9 years ago

I am a noob at most coding so the two things I am trying to do are

  1. Create a button and link it to a key combination - I am still learning how to build the button. So I am a bit ahead of myself trying to link the button I have not created yet using a key combo.
  2. I should have put this as 1 as this seems easier but I could be wrong, I want to create a key combination like CRTL+N = New TW Entry and CRTL+J = New Journal Entry.

Thank you very much for porting this to TiddlyWiki as I find it very helpful to create shortcuts for the things I want to do with TW5. I also have a very specific project in mind that will need special key combinations to work.

welford commented 9 years ago

Unfortunately I don't know the answer to this. It would be good to know how to do this.

I thought it might be something like invoking $tw.rootWidget.dispatchEvent({type: "tm-new-tiddler"}); from within example.js. But alas it is not that simple.

Ask here how to invoke new tiddler from within some a startup module and we can both find out :)

https://groups.google.com/forum/#!forum/tiddlywikidev

RichShumaker commented 9 years ago

I have created a new post to see if anyone has a solution, https://groups.google.com/forum/#!topic/tiddlywikidev/YGrt0jeqtOg Thank you very much again for creating this.