I write javascript code as follows to realize walk straight function, but I don’t know how to do next.
//zoom-in is a picture
document.getElementById("zoom-in").onclick =
//click picture to response key"w"(walk straight) function
function wkey(){
$(document).keydown(function (w){
//don't know how to coding....
//console.log(w.keyCode);
});
};
Is there have any ways to only click or hold the customized picture to realize walk straight function, not controled by shortcuts, mouse wheel on PC?