In X11, is there a way to configure the keyboard so that the behavior of the context menu key is as follows:

  • KeyPress opens the context menu.
  • As long as the key is held down, the menu stays open and can be navigated with the arrow keys.
  • KeyRelease executes the highlighted action (or closes the menu, if nothing is highlighted).

Ideally, there would also be a way to return the menu to the initial "nothing highlighted state" using only the arrow keys as well.

Is this possible?

closed as off-topic by Gilles, DarkHeart, Satō Katsura, phk, Anthon May 18 '17 at 22:03

  • This question does not appear to be about Unix or Linux within the scope defined in the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    It's certainly possible, but you need a "toolkit" that supports it, or you need to write your own widgets, or modify existing source. – dirkt May 17 '17 at 11:01
  • 4
    I'm voting to close this question as off-topic because it's a programming question. You can ask programming questions on Stack Overflow, but you'll have to be more specific: how to do this depends entirely on which widget toolkit you're using. – Gilles May 17 '17 at 22:22