Translate unicode keys to actual characters to ensure better handling of shortcut keys.

This commit is contained in:
jcass 2015-01-09 13:01:29 +02:00
parent 13c0244643
commit 11b11a855d

View File

@ -509,8 +509,10 @@ $(document).ready(function(event) {
$(document).keypress( function (event) {
//console.log('kp: '+event);
if (event.target.tagName != 'INPUT') {
switch(event.which) {
case 32:
var unicode=event.keyCode? event.keyCode : event.charCode;
var actualkey=String.fromCharCode(unicode);
switch(actualkey) {
case ' ':
doPlay();
event.preventDefault();
break;