Hi Jeremy, What i saw of the current keyboard widget was that it wrapped around a certain segments and only worked while the focus was within that area. Is it possible to use this on a global (to the TW) scale?
>>Why do you need an element ID? I needed to be able to set the focus to my search text input at the top of my TW. An ID was the first method in google that presented itself. If there is a better way i am open to suggestions :) Thanks, James On Tuesday, 15 July 2014 03:06:45 UTC+9, Jeremy Ruston wrote: > > Hi James > > I tried adding "accesskey" as a parameter to >> core\modules\widgets\edit-text.js which is simple enough and lets me add >> "alt + key" shortcuts to specific inputs (would it be worthwhile having >> this in the main TW? Is there a way of already doing it that i am missing?) >> > > There's currently no way of setting the accesskey attribute to edit > controls in TiddlyWiki, but it is planned (it's very straightforward, too). > > >> This is useful as it is but Google, Gmail, Facebook use / to jump the the >> search bar so, as a second pass I ported mousetrap ( >> http://craig.is/killing/mice) to TW5. It's a little bare bones right now >> but i think having a script which loops through tiddlers tagged "shortcut", >> or something similar, with a field for the kb press sequence and the script >> in the body of the tiddler would be easy to do and make it quite useful. >> This also required a change to core\modules\widgets\edit-text.js so that I >> could pass through the id of an element. >> > > There's already a keyboard widget as you'll have discovered; it converts > key presses (in a similar format to Mousetrap) into widget messages. The > plan is certainly to have pluggable keyboard shortcut handlers. > > Why do you need an element ID? > > Best wishes > > Jeremy > > You can see an example of both here: http://welford.github.io/ press >> alt+q or / to go to the top search bar. >> >> I thought i would be nice also to be able to press 1~0 to quick jump to >> the first 10 results of a search. I had a look though the list widget and >> couldn't immediately see an elegant way of doing it. As it stands if i >> change the page controls to have high tab indices i can just tab to the >> first result anyway :) >> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "TiddlyWikiDev" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at http://groups.google.com/group/tiddlywikidev. >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Jeremy Ruston > mailto:[email protected] <javascript:> > -- You received this message because you are subscribed to the Google Groups "TiddlyWikiDev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/tiddlywikidev. For more options, visit https://groups.google.com/d/optout.
