blob: 2551f0739cd9d83aba4a44af50d78340d142e3c1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
$(function() {
var firstmove = true;
var search = document.getElementById("search");
$(document).bind('keydown', 'j', function(){
if (firstmove) { firstmove = false; $('#firstmove').focus(); return; }
$(".move:focus").closest('li').next().find('a.move').focus();
})
$(document).bind('keydown', 'k', function(){
if (firstmove) { firstmove = false; $('#firstmove').focus(); return; }
$(".move:focus").closest('li').prev().find('a.move').focus();
})
// $(document).bind('keydown', 'ctrl+[', function(){
// document.location.href = '/';
// })
// $(document).bind('keydown', 'ctrl+return', function(){
// document.location.href = '/terminal';
// })
$(document).bind('keydown', '/', function(){
search.focus();
$('#search').val('');
})
$(document).bind('keydown', 'ctrl+s', function(){
search.focus();
})
$('.move').click(function() {
this.focus();
});
});
|