Here is an example from stackoverflow.
case GDK_m:
if (event->state & GDK_SHIFT_MASK)
{
printf("key pressed: %s\n", "shift + m");
}
else if (event->state & GDK_CONTROL_MASK)
{
printf("key pressed: %s\n", "ctrl + m");
}
else
{
printf("key pressed: %s\n", "m");
}
break;
So I just need to test for Ctrl-t (lowercase) for a terminal in launcher. That will cause an iteration of dbGetEntry() to find an appName == "Terminal Emulator", temporarily setting currentIndex to that appIndex and calling notify().
However, this doesn't work on systems that don't show the terminal icon because they won't have an appEntry for the terminal (it's xml config was removed). So launcher will need to keep the xml handy, even in these cases, and use it to setup a call to a subset of notify() instead of mucking with currentIndex.
Currently the only system that doesn't show the Terminal icon is kiosk, which copies the xml to a .noshow directory. Launcher can load .noshow entries in a separate link list and search them only in special cases. That way any system that doesn't want a terminal can just move it to .noshow in the launcher build, like kiosk does.