Bonsoir à tous

Voilà en cherchant un code sur le net, je suis tombé sur un code qui pourrais éventuellement me convenir.

Le code en question :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
function ffalse()
{
return false;
}
function ftrue()
{
return true;
}
document.onselect = new Function ("return false");
document.onselectstart = new Function ("return false");
document.oncontextmenu = new Function ("return false");
document.ondrag = new Function ("return false");
document.ondragend = new Function ("return false");
document.ondragenter = new Function ("return false");
document.ondragleave = new Function ("return false");
document.ondragover = new Function ("return false");
document.ondrop = new Function ("return false");
document.ondragstart = new Function ("return false");
document.ondragdrop = new Function ("return false");
document.oncopy = new Function ("return false");
document.onbeforecopy = new Function ("return false");
document.onpaste = new Function ("return false");
document.onbeforepaste = new Function ("return false");
document.oncut = new Function ("return false");
document.onbeforecut = new Function ("return false");
document.ondblclick = new Function ("return false");
document.onhelp = new Function ("return false");
if(window.sidebar)
{
document.onmousedown = ffalse;
document.onclick = ftrue;
}
 
function Disable(objEvent) 
{
try {
var sKey;
if(window.event){sKey = window.event.keyCode;} else if(objEvent){sKey = objEvent.which;}   
var objEvent = objEvent || window.event; 
if(sKey == 16 && objEvent.ctrlKey){return false;} //ctrl + majuscule
if(sKey == 27 && objEvent.ctrlKey){return false;} //ctrl + esc
if(sKey == 45 && objEvent.ctrlKey){return false;} //ctrl + ins
if(sKey == 65 && objEvent.ctrlKey){return false;} //ctrl + a
if(sKey == 66 && objEvent.ctrlKey){return false;} //ctrl + b
if(sKey == 67 && objEvent.ctrlKey){return false;} //ctrl + c
if(sKey == 68 && objEvent.ctrlKey){return false;} //ctrl + d
if(sKey == 69 && objEvent.ctrlKey){return false;} //ctrl + e
if(sKey == 70 && objEvent.ctrlKey){return false;} //ctrl + f
if(sKey == 71 && objEvent.ctrlKey){return false;} //ctrl + g
if(sKey == 72 && objEvent.ctrlKey){return false;} //ctrl + h
if(sKey == 73 && objEvent.ctrlKey){return false;} //ctrl + i
if(sKey == 75 && objEvent.ctrlKey){return false;} //ctrl + k
if(sKey == 77 && objEvent.ctrlKey){return false;} //ctrl + m
if(sKey == 78 && objEvent.ctrlKey){return false;} //ctrl + n
if(sKey == 80 && objEvent.ctrlKey){return false;} //ctrl + p
if(sKey == 82 && objEvent.ctrlKey){return false;} //ctrl + r
if(sKey == 83 && objEvent.ctrlKey){return false;} //ctrl + s
if(sKey == 84 && objEvent.ctrlKey){return false;} //ctrl + t
if(sKey == 85 && objEvent.ctrlKey){return false;} //ctrl + u
if(sKey == 86 && objEvent.ctrlKey){return false;} //ctrl + v
if(sKey == 89 && objEvent.ctrlKey){return false;} //ctrl + y
if(sKey == 90 && objEvent.ctrlKey){return false;} //ctrl + z
if(sKey == 91 && objEvent.ctrlKey){return false;} //ctrl + windows
}
catch(ex) {
alert(ex.toString());
}
}
document.onkeydown = Disable;
Le souci est pour les combinaison de touche avec le CTRL qui normalement dois me retourner faux.

Si je prend l'exemple que j'aurais besoin, le CTRL + P. Des que je fais cette combinaison, le choix des imprimantes se lance alors qu'elle ne devraient pas.

Pour info: Se code est pour être intégré dans un logiciel et non sur un site web. Il devra être lu par Internet Explorer 6. Donc si quelqu’un me dit que chez lui sa fonctionne sur Firefox, Opéra ou Chrome, cela ne résous pas mon souci.

Merci à tous ceux qui peuvent m'aider. Amicalement.