Suppose your mistake is that your are using e.stopPropagation()
which just stops further bubling of an event (as your event is attached to a document - it is useless). Try e.preventDefault()
instead:
jQuery(document).keydown(function(e) {
if (e.ctrlKey) {
if (e.keyCode == 65 || e.keyCode == 97) { // 'A' or 'a'
e.preventDefault();
// SELECT ALL MARKERS HERE...
}
}
});
This works fine for me on this demo