3dbe3acc6ce41b7cd460b75ef149d7f9b886ba19 max Thu Apr 21 13:56:03 2016 -0700 adding a help menu entry in hgTracks for the shortcuts, refs #17212 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 92aca84..9c1e44e 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -9355,42 +9355,44 @@ // buttons hPrintf("Mousetrap.bind('c f', function() { $('input[name=\"hgTracksConfigPage\"]').click() }); \n"); hPrintf("Mousetrap.bind('t s', function() { $('input[name=\"hgt_tSearch\"]').click() }); \n"); hPrintf("Mousetrap.bind('h a', function() { $('input[name=\"hgt.hideAll\"]').click() }); \n"); hPrintf("Mousetrap.bind('d t', function() { $('input[name=\"hgt.reset\"]').click() }); \n"); hPrintf("Mousetrap.bind('d o', function() { $('input[name=\"hgt.defaultImgOrder\"]').click() }); \n"); hPrintf("Mousetrap.bind('c t', function() { document.customTrackForm.submit();return false; }); \n"); hPrintf("Mousetrap.bind('t h', function() { document.trackHubForm.submit();return false; }); \n"); hPrintf("Mousetrap.bind('r s', function() { $('input[name=\"hgt.setWidth\"]').click() }); \n"); hPrintf("Mousetrap.bind('r f', function() { $('input[name=\"hgt.refresh\"]').click() }); \n"); hPrintf("Mousetrap.bind('r v', function() { $('input[name=\"hgt.toggleRevCmplDisp\"]').click() }); \n"); hPrintf("Mousetrap.bind('v d', gotoGetDnaPage); \n"); // focus hPrintf("Mousetrap.bind('/', function() { $('input[name=\"hgt.positionInput\"]').focus(); return false; }, 'keydown'); \n"); -hPrintf("Mousetrap.bind('?', function() { $( \"#hotkeyHelp\" ).dialog({width:'600'});}); \n"); +hPrintf("Mousetrap.bind('?', showHotkeyHelp());\n"); // menu if (gotExtTools) hPrintf("Mousetrap.bind('s t', showExtToolDialog); \n"); // multi-region views hPrintf("Mousetrap.bind('e v', function() { window.location.href='%s?%s=%s&virtModeType=exonMostly'; }); \n", hgTracksName(), cartSessionVarName(), cartSessionId(cart)); hPrintf("Mousetrap.bind('d v', function() { window.location.href='%s?%s=%s&virtModeType=default'; }); \n", hgTracksName(), cartSessionVarName(), cartSessionId(cart)); +// also add an entry to the help menu that shows the keyboard shortcut help dialog +hPrintf("$(document).ready(addKeyboardHelpEntry);"); hPrintf("</script>\n"); // help dialog hPrintf("<div style=\"display:none\" id=\"hotkeyHelp\" title=\"Keyboard shortcuts\">\n"); hPrintf("<table style=\"width:580px; border-color:#666666; border-collapse:collapse\">\n"); hPrintf("<tr><td style=\"width:18ch\">left 10%</td><td width=\"auto\" class=\"hotkey\">ctrl+j</td> <td style=\"width:24ch\"> track search</td><td class=\"hotkey\">t then s</td> </tr>\n"); // percent sign hPrintf("<tr><td> left 1/2 screen</td><td class=\"hotkey\">j</td> <td> default tracks</td><td class=\"hotkey\">d then t</td> </tr>\n"); hPrintf("<tr><td> left one screen</td><td class=\"hotkey\">J</td> <td> default order</td><td class=\"hotkey\">d then o</td> </tr>\n"); hPrintf("<tr><td> right 10%</td><td class=\"hotkey\">ctrl+l</td><td> hide all</td><td class=\"hotkey\">h then a</td> </tr>\n"); // percent sign hPrintf("<tr><td> right 1/2 screen</td><td class=\"hotkey\">l</td> <td> custom tracks</td><td class=\"hotkey\">c then t</td> </tr>\n"); hPrintf("<tr><td> right one screen</td><td class=\"hotkey\">L</td> <td> track hubs</td><td class=\"hotkey\">t then h</td> </tr>\n"); hPrintf("<tr><td> zoom in 1.5x</td><td class=\"hotkey\">ctrl+i</td> <td> configure</td><td class=\"hotkey\">c then f</td> </tr>\n"); hPrintf("<tr><td> zoom in 3x</td><td class=\"hotkey\">i</td> <td> reverse</td><td class=\"hotkey\">r then v</td> </tr>\n"); hPrintf("<tr><td> zoom in 10x</td><td class=\"hotkey\">I</td> <td> resize</td><td class=\"hotkey\">r then s</td> </tr>\n");