I would like to implement one particular key combination(Ctrl + Alt + Arrow keys) for navigating the cells in a table. But the issue that I am facing is that it is conflicting with the table navigation keystroke of Jaws.
I have tried various roles to get the event into the javascript that I want to use to enable the navigation but nothing works out.
Here is a snippet of the code:
<body>
<button>test</button>
<div class="wrapper">
<table role="application" tabindex="0">
<tr>
<th tabindex="0">First Name</th>
<th tabindex="0">Last Name</th>
<th tabindex="0">Points</th>
</tr>
<tr>
<td tabindex="0">somen</td>
<td tabindex="0">Smith</td>
<td tabindex="0">50</td>
</tr>
<tr>
<td tabindex="0">Eve</td>
<td tabindex="0">Jackson</td>
<td tabindex="0">94</td>
</tr>
</table>
</div>
<script type="text/javascript">
$('body').on('keydown', function (event) {
var code = event.keyCode || event.which;
var ctrlAltPressed = event.ctrlKey === true && event.altKey === true;
console.log('KEYDOWN: ' + code + ', ' + ctrlAltPressed);
});
$('body').on('keyup', function (event) {
var code = event.keyCode || event.which;
var ctrlAltPressed = event.ctrlKey === true && event.altKey === true;
console.log('KEYUP: ' + code + ', ' + ctrlAltPressed);
});
</script>
</body>
I am not getting an event logged, when i press 'Ctrl + Alt + Arrow Key'.
I am using Jaws 17.0.1010 on Internet Explorer 11 on Windows 7. Any help in this would be greatly appreciated.
Here is the plunker link.
Update The console should give:
37, true // On pressing Ctrl+Alt+LEFT arrow
38, true // On pressing Ctrl+Alt+UP arrow
39, true // On pressing Ctrl+Alt+RIGHT arrow
40, true // On pressing Ctrl+Alt+DOWN arrow
But currently I am not getting anything logged when any arrow key is pressed along with Ctrl and Alt.