Menu

#2535 Win32 menu keyboard traversal broken

obsolete: 8.4.19
open
9
2009-12-09
2008-11-05
No

Greetings,

the Win32 menu keyboard traversal is broken in the
following way:
When a menu (from a menubutton) is posted via the
<Alt-Key> binding (_not_ via the mouse!), the <Escape>
key closes the menu but leaves the menubutton armed.
Unfortunately, another <Alt-Key> on the same menu
then fails! One has to open a different menu before
being able to open the first menu again.

The proposed fix from
http://groups.google.com/groups/search?as_q=Windows+Menu+Keyboard&as_epq=&as_oq=&as_eq=&num=10&scoring=&lr=&as_sitesearch=&as_ugroup=comp.lang.tcl&as_usubject=&as_uauthors=&safe=off

which boils down to adding the line
MenuUnpost {}
to the proc
::tk::MenuFirstEntry
fixes this problem for me.

kind regards,
Randolf
--
http://www.ayam3d.org/ NURBS modelling for the masses.

Discussion

  • Steven

    Steven - 2009-11-29

    Yes. It's totally broken isn't it. My project just goes crazy as soon as you use the menu keyboard bindings, which is almost core usability imho.

    Here's my download link archive. Browse to the bin directory, and click on scid.exe to start program.
    https://sourceforge.net/project/downloading.php?group_id=263836&filename=scid_vs_pc-windows-3.6.26.7.zip

     
  • Donal K. Fellows

    • priority: 5 --> 9
     
  • Steven

    Steven - 2012-08-27

    Is he suggesting this change to menu.tcl:
    ...
    proc ::tk::MenuFirstEntry menu {
    + MenuUnpost {}
    ...
    It doesn't work for me.

    The other hack
    - bind Menubutton <Alt-KeyPress> {
    + bind all <Alt-KeyPress> {
    Also fails. Anyone have a working hack ?