How can a KeyListener detect key combinations (e.g., ALT + 1 + 1)

前端 未结 6 1330
悲哀的现实
悲哀的现实 2020-11-27 07:02

How can I let my custom KeyListener listen for combinations of ALT (or CTRL for that matter) + more than one other key?

Assume

6条回答
  •  無奈伤痛
    2020-11-27 07:38

    I would suggest that instead of using key combinations, consider some input field when the window isVisible() and is focused. The field can be hidden, like Windows' File explorer hidden filename search (enter a directory, type the filename and the correspondence is focused), or is visible, like in Ubuntu.

    Key combinations are not designed for including more than one key other than modifiers, although you may be able to achieve this.

提交回复
热议问题