#583 One more key binding bug

open
nobody
None
5
2007-02-25
2007-02-25
Anonymous
No

Hi,
I found in-equivalence of accelerators in Macro and Background Menus.

Define simple macro

define key_binding_test {
insert_string("test")
}

a) Make Macro Menu item `test' and bind key_binding_test() to Alt+u.
Press Alt+u
String `test' is inserted in buffer. All is OK!
Delete the accelerator in Macro Menu and add it to Xresources

nedit*text.Translations: #override \n\ Alt<Key>u:macro_menu_command("test")\n\

......
Press Alt+u - String `test' is inserted in buffer. All is OK!

b) Delete the entry `test' from Macro Menu and remove Alt+u from Xresources.
Make Background Menu item `test' and bind key_binding_test() to Alt+u.
Press Alt+u
String `testu' is inserted in buffer. THIS IS A BUG!
Delete the accelerator in Background Menu and add it to Xresources

nedit*text.Translations: #override \n\ Alt<Key>u:dg_menu_command("test")\n\

......
Press Alt+u - String `test' is inserted in buffer. All is OK!

5.6 [Under Development] HEAD
Feb 8, 2007

Built on: Linux, 486, GNU C
Built at: Feb 8 2007, 18:45:51
With Motif: 2.2.3 [@(#)Motif Version 2.2.3]
Running Motif: 2.2 [unknown]
Server: The X.Org Foundation 70000000
Visual: 24-bit TrueColor (ID 0x23, Default)
Locale: C

Discussion

  • Joerg Fischer
    Joerg Fischer
    2007-06-14

    Logged In: YES
    user_id=918104
    Originator: NO

    Accelerators in the window background menu can't work, since the menu is not shown. This is merely a documentation bug. While the same dialog box is used for the macro and window background menus, this accelerator thing should be mentioned under "Customizing Menus".

     
  • Logged In: NO

    Hi,

    Accelerators work, see my example, but the "key itself" is also inserted when key is combined with Alt modifier.

    At the same time, when accelerator is specified in Macro menu, the "key itself" is not inserted.

    Alexey

     
  • Joerg Fischer
    Joerg Fischer
    2007-06-15

    Logged In: YES
    user_id=918104
    Originator: NO

    Well, the accelerators for the background menu don't work here:

    5.6 [Under Development] HEAD
    May 17, 2007

    Built on: Win32, 386, GNU C
    Built at: May 17 2007, 10:44:59
    With Motif: (Untested) 2.1.0 [@(#)GNU/LessTif Version 2.1 Release 0.93.95]
    Running Motif: 2.1 [unknown]
    Server: Colin Harrison 60900023
    Visual: 24-bit TrueColor (ID 0x22, Default)
    Locale: C

    BUT I can confirm the behaviour you observed for Open Motif 2.2.4 (which is nothing but 2.2.3 with just a security fix). This surprises me completely, because I reported the problem about accelerators not working for background menu ages ago to the list and was taught then that they can't work and never were intended to be. This was only not documented.

     
  • Logged In: NO

    If key is multiply bound to some macros both in menu and via X resources
    the following hierarchy of macro execution is observed when the key is
    used.

    a) Key is bound via X-resources and in Shell or (and) Macro menu.
    Macro from Shell or Macro menu is executed. X-resource is ignored.

    b) When key is bound via X-resources and in Window Background menu,
    both macros are executed. This is a bug.

    Alexey Kuznetsov