Implemented NativeKeyListener on MacOS.