Commit 865e5717 authored by Mikaël Salson's avatar Mikaël Salson
Browse files

shortcut.js: Shortcuts for increasing/decreasing the top.

The keys are +/-. Not working with the numpad.
By the way this asks the question of the compatibility with the keyboard layout.

Are the key codes dependent on the keyboard layout? Or a + will always be 187, whatever the keyboard?
parent d2ce5963
......@@ -22,11 +22,14 @@
* along with "Vidjil". If not, see <http://www.gnu.org/licenses/>
*/
function Shortcut () {
this.init()
this.on = true
}
var NB_CLONES_CHANGE = 10;
Shortcut.prototype = {
init : function () {
......@@ -66,6 +69,14 @@ Shortcut.prototype = {
e.preventDefault()
m.nextTime()
break;
case 54:
e.preventDefault()
m.displayTop(m.top - NB_CLONES_CHANGE)
break;
case 187:
e.preventDefault()
m.displayTop(m.top + NB_CLONES_CHANGE)
break;
case 83 : //ctrl+s
e.preventDefault()
if (e.ctrlKey || e.metakey) db.save_analysis()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment