• Shift-Tab binding not working

    From Luc@21:1/5 to All on Tue Dec 5 22:32:04 2023
    I have a long series of text widget boxes.

    When I press Tab, the focus jumps from one box to the next one.

    When I press Shift+Tab, the focus jumps from one box to the previous one.

    Other things happen too, but they are not relevant now except that they
    only happen when I jump forward, never when I jump backwards.

    Jump forward and jump backwards have different proc sections and I could determine that the jump backwards section is never run.

    These are my bindings:

    bind [set ::target_$x] <Tab> {p.navigate "down"; break}
    bind [set ::target_$x] <Shift_R><Tab> {p.navigate "up"; break}

    Any idea on how I can find out why one section is never run? They are
    stated one right after the other and there is no 'return' or loop break/continue command involved.

    In fact, I put a debug statement right at the fiirst line of the proc
    like puts $action and the "up" action never turns up. The "down" action
    turns up every time.

    The second binding is not working. Why?

    --
    Luc


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From undroidwish@21:1/5 to Luc on Wed Dec 6 05:34:54 2023
    On 12/6/23 02:32, Luc wrote:

    ...
    The second binding is not working. Why?

    Since you should use <Shift><Tab> instead. <Shift_R> is the actual key,
    but <Shift> the qualifier state.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Manfred Stelzhammer@21:1/5 to All on Wed Dec 6 18:31:48 2023
    Hi

    Try:

    ## script start
    pack [entry .en]
    bind .en <Key> "tuwas %K"

    proc tuwas {args} {
    puts "the key is $args"
    }


    ## script end

    Now fous .en

    Press <Shift><Tab>

    Now you'll see the keysum.

    I my case on linux it's ISO_Left_Tab


    Regards

    Manfred

    Am 06.12.23 um 18:18 schrieb Luc:
    On Wed, 6 Dec 2023 05:34:54 +0100, undroidwish wrote:

    On 12/6/23 02:32, Luc wrote:

    ...
    The second binding is not working. Why?

    Since you should use <Shift><Tab> instead. <Shift_R> is the actual key,
    but <Shift> the qualifier state.

    **************************

    No.

    bad event type or keysym "Shift"
    while executing
    "bind [set ::target_$x] <Shift><Tab> {p.navigate "up"; break}"



    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luc@21:1/5 to undroidwish on Wed Dec 6 14:18:55 2023
    On Wed, 6 Dec 2023 05:34:54 +0100, undroidwish wrote:

    On 12/6/23 02:32, Luc wrote:

    ...
    The second binding is not working. Why?

    Since you should use <Shift><Tab> instead. <Shift_R> is the actual key,
    but <Shift> the qualifier state.

    **************************

    No.

    bad event type or keysym "Shift"
    while executing
    "bind [set ::target_$x] <Shift><Tab> {p.navigate "up"; break}"


    --
    Luc


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Luc@21:1/5 to Manfred Stelzhammer on Wed Dec 6 16:27:18 2023
    On Wed, 6 Dec 2023 18:31:48 +0100, Manfred Stelzhammer wrote:

    Hi

    Try:

    ## script start
    pack [entry .en]
    bind .en <Key> "tuwas %K"

    proc tuwas {args} {
    puts "the key is $args"
    }


    ## script end

    Now fous .en

    Press <Shift><Tab>

    Now you'll see the keysum.

    I my case on linux it's ISO_Left_Tab


    Regards

    Manfred

    **************************

    Yes. That works.

    A little strange that both the left and the right Shift keys generate ISO_Left_Tab.

    But OK, that works for me.

    Problem solved. Thank you.

    --
    Luc


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rich@21:1/5 to Luc on Wed Dec 6 20:39:45 2023
    Luc <luc@sep.invalid> wrote:

    A little strange that both the left and the right Shift keys generate ISO_Left_Tab.

    But OK, that works for me.

    That is because it is not referring to the key, but rather the action
    the key signifies. It is indicating do the action of "tabbing to the
    left".

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Manfred Stelzhammer@21:1/5 to All on Fri Dec 8 23:43:42 2023
    Hello

    ##
    pack [entry .en]
    bind .en <Key> "tuwas %K"

    proc tuwas {key} {
    if {$key eq "Shift_L"} {set ::mylastshiftkey Shift_L}
    if {$key eq "Shift_R"} {set ::mylastshiftkey Shift_R}
    if {$key ne "ISO_Left_Tab" || $::mylastshiftkey ne "Shift_L"} {return}
    ##Your code##
    puts "<Shift-Left><Tab> pressed"
    }
    ##

    With this code only <Shift_L><Tab> works

    regards

    Manfred

    Am 06.12.23 um 20:27 schrieb Luc:
    On Wed, 6 Dec 2023 18:31:48 +0100, Manfred Stelzhammer wrote:

    Hi

    Try:

    ## script start
    pack [entry .en]
    bind .en <Key> "tuwas %K"

    proc tuwas {args} {
    puts "the key is $args"
    }


    ## script end

    Now fous .en

    Press <Shift><Tab>

    Now you'll see the keysum.

    I my case on linux it's ISO_Left_Tab


    Regards

    Manfred

    **************************

    Yes. That works.

    A little strange that both the left and the right Shift keys generate ISO_Left_Tab.

    But OK, that works for me.

    Problem solved. Thank you.


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)