Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Slowly and surely the unix crept up on the Nintendo user ...


devel / comp.lang.forth / Re: how to trap ctrl+c key ?

SubjectAuthor
* how to trap ctrl+c key ?gobli...@gmail.com
+* Re: how to trap ctrl+c key ?none
|+* Re: how to trap ctrl+c key ?Brian Fox
||+- Re: how to trap ctrl+c key ?dxforth
||+* Re: how to trap ctrl+c key ?gobli...@gmail.com
|||+- Re: how to trap ctrl+c key ?gobli...@gmail.com
|||+* Re: how to trap ctrl+c key ?Brian Fox
||||`- Re: how to trap ctrl+c key ?Anton Ertl
|||`* Re: how to trap ctrl+c key ?Anton Ertl
||| `- Re: how to trap ctrl+c key ?none
||`* Re: how to trap ctrl+c key ?none
|| `* Re: how to trap ctrl+c key ?minforth
||  +* Re: how to trap ctrl+c key ?dxforth
||  |`* Re: how to trap ctrl+c key ?Anton Ertl
||  | `* Re: how to trap ctrl+c key ?dxforth
||  |  `* Re: how to trap ctrl+c key ?none
||  |   `* Re: how to trap ctrl+c key ?dxforth
||  |    `* Re: how to trap ctrl+c key ?none
||  |     `* Re: how to trap ctrl+c key ?dxforth
||  |      `* Re: how to trap ctrl+c key ?David Schultz
||  |       `- Re: how to trap ctrl+c key ?dxforth
||  `- Re: how to trap ctrl+c key ?S Jack
|`* Re: how to trap ctrl+c key ?gobli...@gmail.com
| `- Re: how to trap ctrl+c key ?Anton Ertl
+- Re: how to trap ctrl+c key ?Krishna Myneni
`- Re: how to trap ctrl+c key ?none

Pages:12
Re: how to trap ctrl+c key ?

<nnd$3adcea68$5190a4a1@aea17d011d1c73d7>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=24463&group=comp.lang.forth#24463

  copy link   Newsgroups: comp.lang.forth
Newsgroups: comp.lang.forth
References: <08895bfe-78fe-486c-83ef-9cce636a790fn@googlegroups.com>
Subject: Re: how to trap ctrl+c key ?
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
From: albert@cherry (none)
Originator: albert@cherry.(none) (albert)
Message-ID: <nnd$3adcea68$5190a4a1@aea17d011d1c73d7>
Organization: KPN B.V.
Date: Mon, 28 Aug 2023 16:31:05 +0200
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder1.feed.usenet.farm!feed.usenet.farm!peer01.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!feed.abavia.com!abe006.abavia.com!abp002.abavia.com!news.kpn.nl!not-for-mail
Lines: 46
Injection-Date: Mon, 28 Aug 2023 16:31:05 +0200
Injection-Info: news.kpn.nl; mail-complaints-to="abuse@kpn.com"
X-Received-Bytes: 2083
 by: none - Mon, 28 Aug 2023 14:31 UTC

In article <08895bfe-78fe-486c-83ef-9cce636a790fn@googlegroups.com>,
gobli...@gmail.com <goblinrieur@gmail.com> wrote:
>hello
>
>how could I trap ctrl+c key to call a word ?
>just like
>
>: test
>\ some stuff
>key
>case
>81 of dosomething endof
>ctrlc of callaword endof
>\etc...
>;
>
>without breaking forth interpretor execution but really using it as a key or input flow
>
>currently whatever I tryied yet continues to use ctrl-c as BREAK signal...
>

There are really two interpretations of this question, with different answer.
Example ^C.
I As everybody knows Wordstar (and IBM before them) has defined this key
as an editor command, scroll half a page down.
You want KEY to return 3. This is accomplished with fiddling with the
terminal properties (setterm c.s)

II
You have made a game. You want to make it impossible to interrupt the game,
preventing the gamer to falsify the high scores.
This is accomplished by manipulating traps. You can instruct linux
to ignore the trap associated with ^C.
That is a "system call" buried in layers of c-code landing at
NR_signal or some such.

All details are highly specific.

Groetjes Albert
--
Don't praise the day before the evening. One swallow doesn't make spring.
You must not say "hey" before you have crossed the bridge. Don't sell the
hide of the bear until you shot it. Better one bird in the hand than ten in
the air. First gain is a cat spinning. - the Wise from Antrim -

Pages:12
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor