On Thursday, October 5, 2017 at 11:19:38 AM UTC-5, Mark S. wrote:
>
>
>
> On Thursday, October 5, 2017 at 8:50:39 AM UTC-7, Daniel Fjerstad wrote:
>>
>>
>> Mark S.:
>>
>> >I prefer to be in charge of when the data gets saved. It would be really 
>> nice if TW had a "save" key stroke for the save action, though.
>>
>> I have found a workaround for the fact that there isn't a "Save 
>> Tiddlywiki" shortcut key: I modified $:/core/modules/widgets/button.js to 
>> implement an "accesskey" option.  The "accesskey" property is something 
>> implemented by every browser for buttons, and is usually triggered by 
>> pressing Ctrl-Shift or Alt-Shift and the access key. I can show you my 
>> implementation if you would like.
>>
>>
> Oh yes! Please share! It sounds interesting.
>
> Mark
>

Sure thing. I simply added the logic to implement the accesskey attribute 
into the $:/core/modules/widgets/button.js tiddler. You can see a copy of 
that here: https://pastebin.com/0rEA3aYZ

Then to use it, all you do is modify the (save) button widget call to 
include the accesskey attribute with a value corresponding to the key you 
wish to be associated with that button. In my case I added accesskey="s" to 
the $button widget call in $:/core/ui/Buttons/save-wiki tiddler. You can 
see a copy of that here: https://pastebin.com/wbut1Ztz

Then you press Alt+Shift+S or Alt+S depending on your browser. See here: 
https://www.w3schools.com/tags/att_global_accesskey.asp

PS, I found the idea behind this solution on this forum, I think it might 
have been Eric Schulman's idea originally.


 

-- 
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 post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/2c9564a1-d5d3-4e87-a585-1fce789b8ac8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to