Ctrl+A event on datatables
Ctrl+A event on datatables
sdinesh21
Posts: 37Questions: 0Answers: 0
Hi All, Could someone please suggest a solution to bind keydown event on datatables? I want to capture ctrl+a key press, I have tried the following but none of them work.
[code]
$(tblNameId).on('keydown', function(event) {
event.preventDefault();
if (event.ctrlKey && event.which == 65) {
//Event captured
}
}
});
$(tblNameId).on('keypress', function(event) {
event.preventDefault();
if (event.ctrlKey && event.which == 65) {
//Event captured
}
}
});
$(tblNameId).on('keyup', function(event) {
event.preventDefault();
if (event.ctrlKey && event.which == 65) {
//Event captured
}
}
});
[/code]
[code]
$(tblNameId).on('keydown', function(event) {
event.preventDefault();
if (event.ctrlKey && event.which == 65) {
//Event captured
}
}
});
$(tblNameId).on('keypress', function(event) {
event.preventDefault();
if (event.ctrlKey && event.which == 65) {
//Event captured
}
}
});
$(tblNameId).on('keyup', function(event) {
event.preventDefault();
if (event.ctrlKey && event.which == 65) {
//Event captured
}
}
});
[/code]
This discussion has been closed.
Replies
Allan