On Wed, 07 Aug 2013 20:58:52 GMT, Mike Wey wrote:

On Wed, 07 Aug 2013 01:08:13 GMT, Joel Christensen wrote:

Yay, it works. I can just hit control + S save my work, and not have to move the mouse at all. Though I used a dummy menu item, that was attached to the grid, but not shown. Is there a better way?

As far as i know the AccelGroup need to be associated with an menuItem to function properly.

This might also work: (i wasn't able to test it)

window.addOnKeyPress(&keyPressCallback);

bool keyPressCallback(Event ev, Widget w)
{
	if ( ev.key.keyval == GdkKeysyms.GDK_s
		&& ev.key.state == GdkModifierType.CONTROL_MASK )
	{
		//Do stuff.

		return true;
	}

	return false;
}