Crazy keyboard stuff.

master
Nick Sergeant 2012-02-15 00:49:55 -05:00
parent a74bc2d7c1
commit e284a28aba
6 changed files with 52 additions and 3 deletions

View File

@ -1182,7 +1182,7 @@ div.modal .modal-header h4 {
margin-top: 1px; }
div#keyboard-shortcuts {
max-height: 501px; }
max-height: 590px; }
div#keyboard-shortcuts table {
margin-bottom: 0; }

View File

@ -988,6 +988,21 @@ jQuery(function($) {
$document.bind('keydown', 'h', function(e) {
$el.trigger('showKeyboardShortcuts');
});
$document.bind('keydown', 'Shift+h', function(e) {
window.location = '/';
});
$document.bind('keydown', 't', function(e) {
window.open('', '_blank');
});
$document.bind('keydown', 'r', function(e) {
location.reload(true);
});
$document.bind('keydown', 'Ctrl+h', function(e) {
history.go(-1);
});
$document.bind('keydown', 'Ctrl+l', function(e) {
history.go(1);
});
$('input').bind('keydown', 'esc', function(e) {
e.preventDefault();
this.blur();

View File

@ -808,7 +808,7 @@ div.modal {
}
}
div#keyboard-shortcuts {
max-height: 501px;
max-height: 590px;
table {
margin-bottom: 0;

View File

@ -61,6 +61,21 @@
$document.bind('keydown', 'h', function(e) {
$el.trigger('showKeyboardShortcuts');
});
$document.bind('keydown', 'Shift+h', function(e) {
window.location = '/';
});
$document.bind('keydown', 't', function(e) {
window.open('', '_blank');
});
$document.bind('keydown', 'r', function(e) {
location.reload(true);
});
$document.bind('keydown', 'Ctrl+h', function(e) {
history.go(-1);
});
$document.bind('keydown', 'Ctrl+l', function(e) {
history.go(1);
});
$('input').bind('keydown', 'esc', function(e) {
e.preventDefault();
this.blur();

View File

@ -7,5 +7,4 @@
</li>
{% endfor %}
</ul>
<a href="/public/tags/" class="view-all">View all &raquo;</a>
</section>

View File

@ -164,6 +164,26 @@
<td>G</td>
<td>Scroll to bottom of page</td>
</tr>
<tr>
<td>&lt;ctrl-h&gt;</td>
<td>Back</td>
</tr>
<tr>
<td>&lt;ctrl-l&gt;</td>
<td>Forward</td>
</tr>
<tr>
<td>H</td>
<td>Go home</td>
</tr>
<tr>
<td>t</td>
<td>Open new window/tab</td>
</tr>
<tr>
<td>r</td>
<td>Refresh page</td>
</tr>
<tr>
<td>n</td>
<td>Next page</td>