Description: |
I've been using BWidgets 1.6.0 to create a simple interface
for viewing some text. One of my 'Edit' menu items is
'Find...' for which I wanted to use the control-f sequence as
an accelerator. Try as I might, it didn't work so I dug into
how the menus are created in mainframe.tcl and discovered
a problem with the regular expression used when looking for
the F1 -> F19 special keyboard keys.
As it turns out, the regular expression that's supposed to be
looking for "f1", "f2", ... "f19" is matching "f" as well. Since
it matches, the variable gets converted to upper case, which
it apparently has to be for the special F keys. However, this
changes what should be <Control-f> to <Control-F> which
means you have to hold the shift key in order to activate it.
The regular expression checks I'm referring to is in
_parse_accelerator() routine near the bottom of
mainframe.tcl. The expression is {f[1]?[0-9]*} but should
be, I believe, {f1?[0-9]}. This new expression matches
everything its supposed to and doesn't match "f".
I've attached a simple test case to show what I'm talking
about.
|