From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Left Spin" To: sourcenav@sources.redhat.com Subject: rebinding editor keys Date: Mon, 16 Jul 2001 10:58:00 -0000 Message-id: X-SW-Source: 2001-q3/msg00049.html I'm new to Tcl/Tk. I'm rebinding keystrokes for a text widget in Source Navigator. I'm trying to bind to a page up script. At first I tried proc sn_rc_editor {view text} { # PAGE UP # bind $text { set linesperpage [eval %W cget -height] %W mark set insert "insert -$linesperpage lines" %W see insert break } } but I found that $linesperpage was not correct after resizing the window. Then I tried proc sn_rc_editor {view text} { # PAGE UP # bind ${text} [bind ${text} ] } I have to admit I don't understand how this bind syntax works. I found it in some of the Source Navigator source code. I was thinking that maybe I could just map the keystroke to the already defined page up functionality. Thanks for your help. _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com