Ticket #1752 (closed enhancement: fixed)
Keyboard shortcut for Edit/Preview buttons
| Reported by: | Shun-ichi Goto <gotoh@…> | Owned by: | jonas |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.9 |
| Component: | general | Version: | none |
| Severity: | normal | Keywords: | accesskey |
| Cc: | m@… |
Description
I'm using modified template file with adding keyboard shortcut via 'accesskey' attribute for 'Edit' button and 'Preview' button they are frequently used.
I assigned 'r' key (ALT-R on windows) for 'Preview',
and 'e' key (ALT-E on windows) for 'Edit'.
## Other buttons are not assinged because of avoid submitting by miss operation.
I think this is usefull for daily trac operation.
Index: newticket.cs
===================================================================
--- newticket.cs (revision 1886)
+++ newticket.cs (working copy)
@@ -95,7 +95,7 @@
var:htdocs_location ?>js/wikitoolbar.js"></script>
<div class="buttons">
- <input type="submit" name="preview" value="Preview" />
+ <input type="submit" name="preview" value="Preview" accesskey="r" />
<input type="submit" value="Submit ticket" />
</div>
</form>
Index: ticket.cs
===================================================================
--- ticket.cs (revision 1886)
+++ ticket.cs (working copy)
@@ -287,7 +287,7 @@
var:htdocs_location ?>js/wikitoolbar.js"></script>
<div class="buttons">
- <input type="submit" name="preview" value="Preview" />
+ <input type="submit" name="preview" value="Preview" accesskey="r" />
<input type="submit" value="Submit changes" />
</div>
</form>
Index: wiki.cs
===================================================================
--- wiki.cs (revision 1886)
+++ wiki.cs (working copy)
@@ -227,7 +227,7 @@
<?cs /if ?>
</fieldset>
<div class="buttons">
- <input type="submit" name="preview" value="Preview" />
+ <input type="submit" name="preview" value="Preview" accesskey="r" />
<input type="submit" name="save" value="Submit changes" />
<input type="submit" name="cancel" value="Cancel" />
</div>
@@ -257,7 +257,7 @@
if:trac.acl.WIKI_MODIFY ?>
<form method="get" action="<?cs var:wiki.current_href ?>"><div>
<input type="hidden" name="action" value="edit" />
- <input type="submit" value="<?cs if:wiki.exists ?>Edit<?cs else ?>Create<?cs /if ?> this page" />
+ <input type="submit" value="<?cs if:wiki.exists ?>Edit<?cs else ?>Create<?cs /if ?> this page" accesskey="e" />
</div></form><?cs
if:wiki.exists ?>
<form method="get" action="<?cs var:wiki.attach_href ?>"><div>
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


