diff options
Diffstat (limited to 'peniquitous.js')
-rw-r--r-- | peniquitous.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/peniquitous.js b/peniquitous.js index 2c01232..c858f42 100644 --- a/peniquitous.js +++ b/peniquitous.js @@ -8,8 +8,18 @@ var all_inputs = document.querySelectorAll('input[type="text"]'); for (var i = 0; i < all_inputs.length; i++) { - all_inputs[i].addEventListener('focus', function() { - // Bind keyboard event + all_inputs[i].addEventListener('keyup', function(e) { + if (e.ctrlKey && e.keyCode === 80) { + KeyEvent.simulate(0, 38, [], e.target); + } + else if (e.ctrlKey && e.keyCode === 78) { + KeyEvent.simulate(0, 40, [], e.target); + } }); } + + window.setTimeout(function() { + KeyEvent.simulate(0, 40, [], document.getElementById('lst-ib')); + console.log('fired'); + }, 6000); })(); |