1

I'm trying to read which button was pressed from a console application, but I'm unsuccessful with 3rd (right) button.

After enabling mouse tracking with CSI ? 9 h, I get CSI M b x y, where b corresponds to 32 + button_no, but only for left and middle button. Third (right) button opens a pop-up windowmanager menu, and I'm unable to read it

I'm directly reading ESC sequences, don't want to use ncurses

Any suggestions?

francesc
  • 343
  • 3
  • 12

1 Answers1

0

Since nobody answers, I answer to myself:

Some key/mouse presses are intercepted by the terminal emulator. Sometimes can be disabled or changed to another keypress combination. P.e. same happens with F1, which gnome-terminal intercepts as giving help, so there's no possibility to pass it to the application. Fortunately "show help" can be disabled/assigned to another key in gnome-terminal.

No luck with 3rd mouse button, it's hard coded to a pop-up menu. Solutions: use another key, change terminal emulator (xterm works properly)

Regards

francesc
  • 343
  • 3
  • 12