I'm trying to get https://github.com/tzuryby/jquery.hotkeys to work, but:
$('#myInput').on({
'keydown.space keydown.left keydown.right keydown.- keydown..' : function(e)
{
console.log( e.which );
}
});
The above snippet responds to space, left and right buttons. No hyphen and neither of dots (the one near ctrl, and the numpad one) invoke the event.
And, hence, the question,
How do I target special keys like dot + numpad dot, numpad add + plus, numpad subtract + hyphen, quote, colon etc.?
According to this and this, keypress doesn't fire on special characters in the version of 'hotkeys' that you are using. I'd recommend switching to this similar library that was actually a fork of the tzuryby library and written by John Resig.
You can capture the period key like this fiddle.