welford / twmousetrap

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

Not really an issue but... #1

Closed RichShumaker closed 9 years ago

RichShumaker commented 9 years ago

Do you have any examples of using MouseTrap type things in TiddlyWiki 5? I wanted to create a key combo but don't know how to do it and wanted to see some examples.

Thanks.

Rich Shumaker

welford commented 9 years ago

https://github.com/welford/twmousetrap/blob/master/example.js some example code here. The results of which are here: http://welford.github.io/ try crtl+shift+x for an alert or / to jump to the search at the top.

RichShumaker commented 9 years ago

Thanks. I tried the / on Firefox and a find box for Firefox showed up. The Crtl+shift+x was cool. Have you linked it to TW buttons by any chance? I am just exploring what is possible and what is realistic before I get crazy ideas, #heheh, too late. Rich Shumaker

welford commented 9 years ago

find box for Firefox showed up.

I'm guessing that is a firefox specific thing? / to search works for both Chrome and IE. It's inspired by gmail/google where / will take you to the search (in chrome it works with gmail but not google.com as typing with the focus anywhere will set focus to the search)

I don't have any examples, but it should be easy enough to link it to buttons. I have had it working with my twexe plugin to launch programs.

RichShumaker commented 9 years ago

Awesome and thanks. Will try some stuff out and thank you very much for implementing this. Oh and that is very cool that you can launch programs from inside TiddlyWiki. Rich Shumaker