Java KeyListener: KeyTyped Backspace, Esc as input

前端 未结 7 1041
耶瑟儿~
耶瑟儿~ 2020-12-29 10:33

Inside the KeyTyped method, how do I tell if Backspace or Esc is being pressed?

7条回答
  •  一向
    一向 (楼主)
    2020-12-29 11:01

    You can also use e.getExtendedKeyCode() in keyTyped and it returns non-zero values that appear correct.

提交回复
热议问题