Ok I got it now.
I used Hugos answer, but changed the event to keyup
and now it works perfectly fine in all of the browsers (although IE I still haven't tested).
$(document).ready(function(){
$(document).on("keyup",".select2-input", function (event) {
console.log("key up");
if (!event) event = window.event;
var keyCode = event.keyCode || event.which;
if(keyCode == '13' /* enter key */ ) {
console.log("press enter");
}
});
});
Thanks a lot!