Hello all,

The ExtJS framework as a whole is very intiutive, and the documentation is enormously helpful. However, there is one situation that I cannot seem to figure out, even with the help of the many forum posts on the topic.

I have a panel showing two components: a grid showing all records or a table and beneath it a panel showing more details on the selected record. Above the grid is a toolbar, that contains buttons to add and delete a record.

I would like for these buttons to have keyboard shortcuts.

At first glance this seemed simple enough. I added a listener to the container panel, listening for any 'onkeypress' events. However, no such events were ever received. Delving into the documentation, I quickly discovered that key presses are handled differently from mouse events, and that I would need to use a KeyMap. Despite looking exactly like what I think I need, I cannot seem to get the KeyMap to work either.

Here is what I tried:

Code:
container.on("render", function()
	{
		var map = new Ext.util.KeyMap(container.getEl(),
		[{
			key: "h",
			alt: true,
			fn: function () { alert("Add"); },
			scope: container
		},{
			key: "d",
			alt: true,
			fn: function () { alert("Delete"); },
			scope: container
		}]);
	}, this);
(The container is a reference to the panel wrapping around the grind and detail view.)

After some more searching, I happened across a very convenient toolbar plugin. Unfortunately, out of the box trying to use this only results in an uncaught TypeError in the 'init' function of the plugin. It seems that toolbar.onrender does not have a method 'createSequence'.

So... I'm stuck. I can get neither the KeyMap nor the plugin to work. I'm convinced that I'm missing something obvious. Is there anyone that could shed some light on this for me?

Sincerely,
Bart