From: "Left Spin" <leftspin@hotmail.com>
To: sourcenav@sources.redhat.com
Subject: rebinding editor keys
Date: Mon, 16 Jul 2001 10:58:00 -0000 [thread overview]
Message-ID: <F44DIT6bB5Rw1SSfWXW00002bc1@hotmail.com> (raw)
I'm new to Tcl/Tk. I'm rebinding keystrokes for a text widget in Source
Navigator.
I'm trying to bind <Control-R> to a page up script.
At first I tried
proc sn_rc_editor {view text} {
# PAGE UP
#
bind $text <Control-r> {
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} <Control-r> [bind ${text} <pageup>]
}
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
next reply other threads:[~2001-07-16 10:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-16 10:58 Left Spin [this message]
2001-07-16 11:09 ` Mo DeJong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=F44DIT6bB5Rw1SSfWXW00002bc1@hotmail.com \
--to=leftspin@hotmail.com \
--cc=sourcenav@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).