0

Every org.eclipse.draw2d.Figure class has addKeyListener() method. But when key presses not every Figure handle it. What kind of figure handles key-events?

Thanks.

Stan Kurilin
  • 15,614
  • 21
  • 81
  • 132

2 Answers2

0

Hm. I don't know real answer. But as variant - add listener to Shell and handle it in some specific way.

Stan Kurilin
  • 15,614
  • 21
  • 81
  • 132
0

The answer is "whichever Figure currently has focus." - otherwise every time you pressed a key, all of your figures would receive the KeyEvent and have to handle it. I'd suggest that's unlikely to be what you want.

razlebe
  • 7,134
  • 6
  • 42
  • 57