公司项目使用了 Antd,而 Antd 依赖了 `rc-input` 的代码。通过查看源码后发现 `onPressEnter` 使用了 [onkeydown](https://github.com/react-component/input/blob/master/src/Input.tsx#L86) 实现检查是否按下 Enter,但这种实现会导致在 Mac 系统上使用中文输入法的情况下,输入任意内容不选择任何联想项时按下 `Enter` 键,会触发对应逻辑,正常情况下应该不做处理?个人尝试后发现使用 `onkeypress` 是没有问题的。 这是我写的 [最小复现 Demo](https://dreamer-paul.github.io/Code-Snippets/2022-10-24%20Mac%20%E8%BE%93%E5%85%A5%E6%B3%95%E5%9B%9E%E8%BD%A6%E9%97%AE%E9%A2%98/),如果使用非 `onkeypress` 的方式捕获,则会触发此问题,Windows 貌似没有出现此问题。 [rc-input 的最小复现](https://codesandbox.io/s/nifty-nash-b2kxhn?file=/src/App.js:135-142) https://user-images.githubusercontent.com/25198337/197444497-1e93cdf7-37ed-4bdd-a8c8-1bd70fa5bf5c.mp4