站内搜索: 请输入搜索关键词
当前页面: 图书首页 > SWT: The Standard Widget Toolkit

2.1 When a Key Is Typed, Where Does It Go? - SWT: The Standard Widget Toolkit

Previous Section  < Day Day Up >  Next Section

2.1 When a Key Is Typed, Where Does It Go?

When a key is typed, the key is resolved by a subsystem in the following order.

  1. Window system

  2. Menu accelerators

  3. Traversal

  4. Focus control

In other words, each of these subsystems is given an opportunity to deal with the keystroke, in the order shown. Once one them has resolved (that is, dealt with) the keystroke, it is not delivered to any others. When a key is delivered to a control and resolved, we say that the key was consumed.

We will discuss each subsystem from the bottom up, starting with keyboard events and the focus control, because this is the likely order that you will need these concepts.

    Previous Section  < Day Day Up >  Next Section