Fri 09 Aug 2013 02:36:49 PM UTC, original submission:
If the mouse pointer is out of the figure window, all the events are discarded, including keyboard events.
This happens according to the implementation of _init_fltk_.cc, as this code snippet of the function "int handle (int event)" shows:
However, this implies incorrect behaviour for the detection of events related to key press and release, and key modifiers.
Such a wrong behaviour can be shown with the help of the following script:
Once the script is run, the wrong behaviour can be verified by following these instructions:
1) go on the black square in the figure window with the mouse pointer, without pressing any mouse button
2) press "alt" (or "ctrl", or "shift", ...) and keep it pressed
3) move the mouse pointer out of the figure window
4) release "alt" (or what was pressed at step 2)
5) move the mouse pointer back on the black square
6) press "1" (or any other number or letter)
At the console, then I get
which shows that the keyboard event was detected as a key press with modifier "alt", which is of course not correct. The correct result would be
|