On my Samsung Galaxy tab 4 (Android 4.4.2, Chrome: 49.0.2623.105) I ran into a situation where the keyCode is always 229.
I've setup a simple test for two situation
<div contenteditable="true"></div>
<input>
<span id="keycode"></span>
script:
$('div, input').on('keydown', function (e) {
$('#keycode').html(e.keyCode);
});
Fortunately I can find posts about this, but I couldn't find one with a working solution. Someone suggested to use keyup
instead or to use the textInput
event, but that one is only fired on blur
.
Now, to top it all, this doesn't happen with the default stock browser :(
Any help would be appreciated!
UPDATE: If it turns out that this is not possible I can still grab the char before the caret: post