c6cbddabb1c64bda5e814db3057299a3da4158bf max Fri Apr 22 10:06:49 2016 -0700 adding shortcut indicators in light gray to menubar, like in SAA/CUA applications. refs #17212 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index ff68e78..6b2ed92 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -9374,32 +9374,39 @@ // focus hPrintf("Mousetrap.bind('/', function() { $('input[name=\"hgt.positionInput\"]').focus(); return false; }, 'keydown'); \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)); +// links to a few tools +hPrintf("Mousetrap.bind('t b', function() { $('#blatMenuLink').click()});\n"); +hPrintf("Mousetrap.bind('t i', function() { $('#ispMenuLink').click()});\n"); +hPrintf("Mousetrap.bind('t t', function() { $('#tableBrowserMenuLink').click()});\n"); +hPrintf("Mousetrap.bind('c r', function() { $('#cartResetMenuLink').click()});\n"); +hPrintf("Mousetrap.bind('s s', function() { $('#sessionsMenuLink').click()});\n"); + // also add an entry to the help menu that shows the keyboard shortcut help dialog -hPrintf("$(document).ready(addKeyboardHelpEntry);"); +hPrintf("$(document).ready(addKeyboardHelpEntries);"); 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");