web: tweak some keys

This commit is contained in:
Simon Michael 2014-07-21 18:16:46 -07:00
parent 059c8dfc97
commit cf6da3af5d
2 changed files with 4 additions and 4 deletions

View File

@ -14,13 +14,13 @@ $(document).ready(function() {
// keyboard shortcuts // keyboard shortcuts
// 'body' seems to hold focus better than document in FF // 'body' seems to hold focus better than document in FF
$('body').bind('keydown', 'shift+/', function(){ $('#helpmodal').modal('toggle'); return false; });
$('body').bind('keydown', 'h', function(){ $('#helpmodal').modal('toggle'); return false; }); $('body').bind('keydown', 'h', function(){ $('#helpmodal').modal('toggle'); return false; });
$('body').bind('keydown', 'shift+/', function(){ $('#helpmodal').modal('toggle'); return false; });
$('body').bind('keydown', 'j', function(){ location.href = '/journal'; return false; }); $('body').bind('keydown', 'j', function(){ location.href = '/journal'; return false; });
$('body').bind('keydown', 's', function(){ sidebarToggle(); return false; }); $('body').bind('keydown', 's', function(){ sidebarToggle(); return false; });
$('body').bind('keydown', 'a', function(){ addformShow(); return false; }); $('body').bind('keydown', 'a', function(){ addformShow(); return false; });
$('body').bind('keydown', 'n', function(){ addformShow(); return false; }); $('body').bind('keydown', 'n', function(){ addformShow(); return false; });
$('body').bind('keydown', '/', function(){ $('#searchform input').focus(); return false; }); $('body').bind('keydown', 'f', function(){ $('#searchform input').focus(); return false; });
$('body, #addform input, #addform select').bind('keydown', 'ctrl+shift+=', addformAddPosting); $('body, #addform input, #addform select').bind('keydown', 'ctrl+shift+=', addformAddPosting);
$('body, #addform input, #addform select').bind('keydown', 'ctrl+=', addformAddPosting); $('body, #addform input, #addform select').bind('keydown', 'ctrl+=', addformAddPosting);
$('body, #addform input, #addform select').bind('keydown', 'ctrl+-', addformDeletePosting); $('body, #addform input, #addform select').bind('keydown', 'ctrl+-', addformDeletePosting);

View File

@ -59,11 +59,11 @@ $newline never
<p> <p>
<b>Keyboard shortcuts <b>Keyboard shortcuts
<ul> <ul>
<li> <b><tt>h</tt></b> or <b><tt>?</tt></b> - view this help (escape or click to exit) <li> <b><tt>h</tt></b> or maybe <b><tt>?</tt></b> - view this help (escape or click to exit)
<li> <b><tt>j</tt></b> - go to the Journal view (home) <li> <b><tt>j</tt></b> - go to the Journal view (home)
<li> <b><tt>a</tt></b> - add a transaction (escape to cancel) <li> <b><tt>a</tt></b> - add a transaction (escape to cancel)
<li> <b><tt>s</tt></b> - toggle sidebar <li> <b><tt>s</tt></b> - toggle sidebar
<li> <b><tt>/</tt></b> or <b><tt>ctrl-s</tt></b> - focus search form <li> <b><tt>f</tt></b> - focus search form ("find")
<p> <p>
<b>General <b>General
<ul> <ul>