I noticed that when trying to use the new factorial definition, I had to
click the factorial option (Discrete->Factorial), rather than just type the
more intuitive ! directly.
Although it shouldn't be too hard to add this shortcut directly into the
code, would it not be better to have the key press defined in the definition
file? That way people can create their own set of definitions with their own
set of key presses, and not have to interact directly with the base code.
Of course, this functionality may be there already and I may have just
missed it. If that's the case, how would one go about adding keypresses to
the definition files.
Good thinking - nope, it's not added yet, but should be. A basic setup could
entail an entry in GlyphMaker that takes a string key combination as
parsable by gtk.accelerator_parse [
http://www.pygtk.org/docs/pygtk/class-gtkaccelgroup.html#function-gtk--accelerator-parse]
and sticks a node<key combination="!"/> into the XML. It would be a
good
prompt to begin moving combination handling over to a GTK managed
AccelGroup, rather than manually through if statements.