Help modifying keyboard.tcl

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Help modifying keyboard.tcl

Igor Sosa Mayor
Hi again,

sorry for asking again...

I wnat to bind <comma> to showGameInfo. I put:

        bind $w <comma> {
                toggleGameInfo
        }

or

        bind $w <comma> {
                ::toggleGameInfo
        }

I also tried F12 (disabling the later bind to correspondence) without
any success...

Any hint?

Many thanks in advance.


--
:: Igor Sosa Mayor     :: [hidden email] ::
:: GnuPG: 0x1C1E2890   :: http://www.gnupg.org/      ::
:: jabberid: rogorido  ::                            ::


------------------------------------------------------------------------------
_______________________________________________
Scid-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/scid-users
Reply | Threaded
Open this post in threaded view
|

Re: Help modifying keyboard.tcl

Fulvio
Igor Sosa Mayor wrote:

> Hi again,
>
> sorry for asking again...
>
> I wnat to bind <comma> to showGameInfo. I put:
>
> bind $w <comma> {
> toggleGameInfo
> }
>
> or
>
> bind $w <comma> {
> ::toggleGameInfo
> }
>
> I also tried F12 (disabling the later bind to correspondence) without
> any success...
>
> Any hint?

bind $w <comma> {
         eval [excludeTextWidget %W]
         set ::showGameInfo [expr {! $::showGameInfo}]
         ::toggleGameInfo
         break
}


The "eval [...." line disable the shortcut for text widgets (without
this line, writing a comment with a comma will rotate the board for example)
The "set ::showGameInfo ..." line toggle the status (visible or not) of
the GameInfo window
The "::toggleGameInfo" line show (or hide) the GameInfo window
(misleading function name indeed)
The "break" line signal that the user input has been processed and
should not be sent to parent windows.

Bye,
Fulvio

------------------------------------------------------------------------------
_______________________________________________
Scid-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/scid-users
Reply | Threaded
Open this post in threaded view
|

Re: Help modifying keyboard.tcl

Igor Sosa Mayor
Fulvio <[hidden email]> writes:

> bind $w <comma> {
>          eval [excludeTextWidget %W]
>          set ::showGameInfo [expr {! $::showGameInfo}]
>          ::toggleGameInfo
>          break
> }
>
>
> The "eval [...." line disable the shortcut for text widgets (without
> this line, writing a comment with a comma will rotate the board for example)
> The "set ::showGameInfo ..." line toggle the status (visible or not) of
> the GameInfo window
> The "::toggleGameInfo" line show (or hide) the GameInfo window
> (misleading function name indeed)
> The "break" line signal that the user input has been processed and
> should not be sent to parent windows.


thanks a lot. Above all for the explanation!


------------------------------------------------------------------------------
_______________________________________________
Scid-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/scid-users