How to disable default keyboard /mouse action in cocos2d-html5

How to disable default keyboard /mouse action in cocos2d-html5
0.0 0

#1

Hi ,

I know the default event action can be overridden in html5 using :

canvas.on(‘click’, function(e) {
e.preventDefault();

var mouse = {
x: e.pageX - canvasPosition.x,
y: e.pageY - canvasPosition.y
}

//do something with mouse position here

return false;
});

But how to do this in html5.