*the syntax has some extra details I'm not much familiar with.
*That's a compound statement - it uses two, nested, ternary operators. It's clearer when you add parentheses:
*So if the first test (event.keyCode) fails, the second value is used, which is itself the result of another ternary operator. If the second test (event.which) fails, the final value (event.charCode) is used.