On mac, in Java, keyPressed event doesn't fire for certain keys

后端 未结 4 1797
南旧
南旧 2021-01-14 19:01

This is a really weird issue, but I just have a simple keyListener added to a JPanel that prints on keyPressed and on keyReleased. Usually it works fine, but on certain keys

4条回答
  •  日久生厌
    2021-01-14 19:50

    I fixed it by going into my system preferences -> keyboard and moving the key repeat slider all the way to the left to "Off".

提交回复
热议问题