Article View: news.software.readers
Article #63646Re: [slrn] Binding esc 1 control-i
From: J.B. Nicholson-Owens
Date: Sun, 23 Jul 2000 00:00
Date: Sun, 23 Jul 2000 00:00
33 lines
1444 bytes
1444 bytes
Arjan Drieman wrote:
> So how can I bind esc 1 control-i?
Make your program parse the prefix argument with get_prefix_arg() and use
the definekey() or setkey statement without the prefix argument:
#v+
definekey ("cancels", "^I", "article"); % in S-Lang code
#v-
or
#v+
setkey article cancels ^I % in your slrnrc
#v-
> Oh, another question comes to mind: How can I override the default
> function for esc crontrol-c?
I tried this:
#v+
public define my_function ()
{
message_now ("This is a test.");
}
definekey ("Global->my_function", "\e^C", "article");
definekey ("Global->my_function", "\e^C", "group");
#v-
and it worked as I expected--only Global->my_function() was executed.
Technical Details
Message-ID:
<slrn8nmgec.7e.jbn@forestfield.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<slrn8nl9t3.bk.qhpxvr@quack.node0911.a2000.nl>Show Full Headers
Complete Article Headers
Message-ID: <slrn8nmgec.7e.jbn@forestfield.org> Subject: Re: [slrn] Binding esc 1 control-i Date: Sun, 23 Jul 2000 00:00:00 +0000 From: jbn@forestfield.org (J.B. Nicholson-Owens) References: <slrn8nl9t3.bk.qhpxvr@quack.node0911.a2000.nl> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 649846644 X-Trace: fu-berlin.de 964379136 4110100 208.216.67.173 (16 [35848]) Organization: Forest Field OmniMedia User-Agent: slrn/0.9.6.2 (Unix) Newsgroups: news.software.readers