Article # 179, added by Geoworks, historical record
| first | previous | index | next | last |

How to intercept MSG_META_KBD_CHAR




There are many instances when you will want your application 
to intercept keyboard input events.  To gain a general 
understanding of how user input works in GEOS, you should 
read the Input chapter of the Concepts book (especially
section 11.1.4 "Input Hierarchies").

In essence, you will either want to intercept all keyboard 
events received by your application or only keyboard events
destined for a specific object in your application.

To capture all keyboard input received by your application, 
handle MSG_META_KBD_CHAR at your GenApplicationClass level.
Otherwise, handle it at the specific object.

You can use the two following swat commands to show you
which objects in your application receive MSG_META_KBD_CHAR.

	"mwatch MSG_META_KBD_CHAR" will show you how the
	    message is passed from object to object and
	    which objects receive the message

	"focus -a" will display the focus tree from the
	    application object (that's what -a flag does)
	    down to the focus node.