I'm working on a directive that has the following code:
return {
restrict: 'A',
scope: {
fn: '&callback',
value:'=value'
},
link: function ( scope, element, attr ) {
element.on( 'keyup', function ( event ) {
if ( event.keyCode >= 1072 && event.keyCode <= 1103 ) {
var t = scope;
scope.fn();
} else {
event.preventDefault();
}
} )
}
}
I've noticed that the keyUp event isn't returning the keycode for Cyrillic letters, but the keypress event is. Does anyone know how I can retrieve the current language or keycode in the keyUp event?