Re: [Scid-users] Help modifying keyboard.tcl

2016-12-01 Thread Igor Sosa Mayor
Fulvio  writes:

> bind $w  {
>  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
Scid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scid-users


Re: [Scid-users] Help modifying keyboard.tcl

2016-12-01 Thread Fulvio
Igor Sosa Mayor wrote:
> Hi again,
>
> sorry for asking again...
>
> I wnat to bind  to showGameInfo. I put:
>
>   bind $w  {
>   toggleGameInfo
>   }
>
> or
>
>   bind $w  {
>   ::toggleGameInfo
>   }
>
> I also tried F12 (disabling the later bind to correspondence) without
> any success...
>
> Any hint?

bind $w  {
 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
Scid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scid-users