On Saturday, February 22, 2020 at 12:13:41 PM UTC-6, Austin(Xu) Wang wrote:
>
> Dear Leo Developer,
>
> If I have a node with 5 subnodes, the child #1 is focused, I clicked 
> SHIFT-DOWN, child #1 and child #2 will swap position.  Is there an event 
> for the position swap?
>

I have just created #1508 
<https://github.com/leo-editor/leo-editor/issues/1508> for this. The new 
code is in devel at rev c76e91.
<https://github.com/leo-editor/leo-editor/commit/c76e91fe72445bf68ed14254366ef33c6dc361a1>

This adds c.command_function and c.command_name ivars for use by event 
handlers.  For example:

def command1_handler(tag, keys):
    c = keys.get('c')
    p = keys.get('p')
    print(f"command1: {c.command_name:>30} {p and p.h}")

g.registerHandler('command1', command1_handler)

I have closed this issue. Please reopen if there are problems.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/9550fb79-bbdf-4306-b840-4b1f72ce136e%40googlegroups.com.

Reply via email to