I m trying to trap key downs in GWT, and I ve tried both addKeyDownHandler and onBrowserEvent. The problem is that they work as long as the appropriate widget had the focus, but it stops working when something else has the focus. I could add the code to every single widget, but that seems crazy. I also tried forcing one single widget to always have the focus, but that causes other problems with things like TextBoxes (which need the focus for typing).
是否只有一种简单、高层次的方法,才能在金星在关贸总会受到压力时启动某些法典,而不论哪一种植被有重点?