Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 44e57047 authored by Marc Duez's avatar Marc Duez

shortcut.js : take control if there is no activeElement

parent e84fd907
......@@ -31,36 +31,39 @@ Shortcut.prototype = {
checkKey : function (e) {
e = e || window.event;
e.preventDefault()
var key = e.keyCode;
if (key==0) key = e.which
if (document.activeElement.id == ""){
e.preventDefault()
var key = e.keyCode;
if (key==0) key = e.which
switch(key) {
case 37 : //left arrow
m.previousTime()
break;
case 39 : //right arrow
m.nextTime()
break;
case 83 : //ctrl+s
if (e.ctrlKey || e.metakey) db.save_analysis()
break;
case 65 : //ctrl+a
if (e.ctrlKey || e.metakey){
var d_m = $("#debug_menu")
if (d_m.css("display") == "none"){
$("#debug_menu").css("display", "");
}else{
$("#debug_menu").css("display", "none");
switch(key) {
case 37 : //left arrow
m.previousTime()
break;
case 39 : //right arrow
m.nextTime()
break;
case 83 : //ctrl+s
if (e.ctrlKey || e.metakey) db.save_analysis()
break;
case 65 : //ctrl+a
if (e.ctrlKey || e.metakey){
var d_m = $("#debug_menu")
if (d_m.css("display") == "none"){
$("#debug_menu").css("display", "");
}else{
$("#debug_menu").css("display", "none");
}
}
}
default:
default:
}
}
if (e.altKey && sp.reinit) {
sp.active_move = true;
}
}
}
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