NotChris,
As far as I know, GXT does not contain structure to support help systems out of the box. However, we've built our own "function" key setup to replicate the existing desktop ERP's hotkeys for the company I work for. With our help system (F1), we just use native javascript to capture the event (valid parts included below..just fill in the Keyhandler_Meta actions), use the event source to build the help context, pass that to a servlet to build the help URL, and then open a window on the UI with the returned URL. Our help documentation is written in a wiki though which makes this setup easy to use.
Code:
//Native JS to capture function keys
protected native void setupFunctionKeys() /*-{
$doc.onkeydown = function(e) { __handleKeys(e); }
$doc.onkeypress = function(e) { __handleKeys(e); }
$doc.onhelp = function() {return(false);}
$wnd.onhelp = function() {return(false);}
var nonChar = false;
var Combo = false;
function __handleKeys(e) {
isScrolling = false;
ScrollingX = false;
ScrollingY = false;
var character;
var evt = (e) ? e : window.event; //IE reports window.event not arg
if (!evt.stopPropagation) {
evt.stopPropagation = function() { this.cancelBubble = true; };
evt.preventDefault = function() { this.returnValue = false; };
}
if (!evt.stop) {
evt.stop = function() {
this.stopPropagation();
this.preventDefault();
};
}
if (evt.ctrlKey && evt.keyCode == 9) {
if (evt.type == "keypress")
Editor.fireOnCtrlTab(evt.shiftKey);
evt.stop();
evt.returnValue = false;
return false;
}
if (evt.type == "keydown") {
character = evt.keyCode;
if (
(character >= 112 && character <= 123) // F1 to F12
) {
nonChar = true;
Keyhandler_Meta(character, evt, e); // function to handle non Characters
} else {
nonChar = false;
}
}
}
function Keyhandler_Meta(Meta, evt, e)
{
if (!evt.kill)
{
evt.kill = function()
{
if (e == undefined) evt.keyCode = false; //Kill IE6+7
evt.stop();
evt.returnValue = false;
}
}
switch (Meta)
{
case 112: //F1
case 113: //F2
case 114: //F3
case 115: //F4
case 116: //F5
case 117: //F6
case 118: //F7
case 119: //F8
case 120: //F9
case 121: //F10
case 122: //F11
case 123: //F12
evt.kill();
break;
default:
break;
}
return true;
}
}-*/;
Hope that helps.
Mjack