If multiple keyboard listening events are registered, even if the keyCode value is modified in the code segment, other keyboard listening events will still obtain the original keyCode. This is related to the JavaScript event model (remember to start from each registered listening event and propagate the event along its own route).
The following is the test code:
[Ctrl A select all Note: <script>
$(function(){
$(document).keydown(function(evt){
debug(evt);
});
});
</script>If you need to introduce external Js, you need to refresh to execute ]<script>
function debug(evt){
document.getElementById('info').innerText=evt.keyCode||evt.charCode;
}
</script>