Use keyCode instead of keyIdentifier.