The following code shows how to disable the shift and ctrl keys in the keyboard. You can use this event to prevent new window being opened while pressing shift/ctrl keys and clicking a link.
<html>
<head>
<script language="Javascript" type="text/javascript">
function disablekeys(event)
{
if (event.shiftKey==1 or event.crtlKey==1 )
{
return false
}
}
</script>
</head>
<body>
<a href="sample.html" onclick="return disablekeys(event)">Press Shift or ctrl and click me</a>
</body>
</html>