Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

If it's worth hacking on well, it's worth hacking on for money.


devel / comp.lang.forth / Re: gforth - how to soytware trigger capslock

SubjectAuthor
* gforth - how to soytware trigger capslockgobli...@gmail.com
+* Re: gforth - how to soytware trigger capslockminforth
|`- Re: gforth - how to soytware trigger capslockgobli...@gmail.com
+* Re: gforth - how to soytware trigger capslockZbig
|`* Re: gforth - how to soytware trigger capslockgobli...@gmail.com
| `- Re: gforth - how to soytware trigger capslockZbig
+* Re: gforth - how to soytware trigger capslockHugh Aguilar
|`- Re: gforth - how to soytware trigger capslockgobli...@gmail.com
`- Re: gforth - how to soytware trigger capslockgobli...@gmail.com

1
gforth - how to soytware trigger capslock

<f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:2b84:b0:76f:58a:8ffc with SMTP id dz4-20020a05620a2b8400b0076f058a8ffcmr359378qkb.7.1694080809161;
Thu, 07 Sep 2023 03:00:09 -0700 (PDT)
X-Received: by 2002:a17:902:e5c6:b0:1bb:b39d:8cb0 with SMTP id
u6-20020a170902e5c600b001bbb39d8cb0mr6355809plf.1.1694080808283; Thu, 07 Sep
2023 03:00:08 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 7 Sep 2023 03:00:07 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:118:ea0:5652:e65:19aa:a256;
posting-account=3HjpJwoAAACwXD1UyRZwC1Lkp4Lq1jcg
NNTP-Posting-Host: 2a01:e0a:118:ea0:5652:e65:19aa:a256
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
Subject: gforth - how to soytware trigger capslock
From: goblinrieur@gmail.com (gobli...@gmail.com)
Injection-Date: Thu, 07 Sep 2023 10:00:09 +0000
Content-Type: text/plain; charset="UTF-8"
 by: gobli...@gmail.com - Thu, 7 Sep 2023 10:00 UTC

hello

currently I use an externol tool to do this in gforth over gnulinux station.

: caps ( -- ) s" xdotool key Caps_Lock" system ;
\ triggers capslock just like pressing the key

I'm looking for a forth solution to make it more forth & less xdotool dependant & even external applicatin independant.

so I am looking for a solution to simulate by a word the capslock keypress.

I ve been guided to https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/386-Assembler.html#g_t386-Assembler and https://gforth.org/manual/AMD64-Assembler.html abi-code solution

then I tried

ONLY FORTH ALSO ASSEMBLER
code toto
$3A # al mov
$02 # ah mov
$80 # int
ret
end-code

that migth be also a solution but I failed as this creates a memory error on execution

I failed to find more documentation or examples to fix it

any pure forth idea ?
any abi-code idea or fix ?
any documentation about the specific abi-code inside gforth ?

thanks

Re: gforth - how to soytware trigger capslock

<75a26522-24bc-4094-80d5-812590a42c19n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:a91:b0:649:afa4:5cae with SMTP id ev17-20020a0562140a9100b00649afa45caemr360462qvb.6.1694081978746;
Thu, 07 Sep 2023 03:19:38 -0700 (PDT)
X-Received: by 2002:a17:902:d48c:b0:1b7:d4d2:c385 with SMTP id
c12-20020a170902d48c00b001b7d4d2c385mr7140597plg.1.1694081978558; Thu, 07 Sep
2023 03:19:38 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 7 Sep 2023 03:19:37 -0700 (PDT)
In-Reply-To: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=87.157.109.105; posting-account=AqNUYgoAAADmkK2pN-RKms8sww57W0Iw
NNTP-Posting-Host: 87.157.109.105
References: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <75a26522-24bc-4094-80d5-812590a42c19n@googlegroups.com>
Subject: Re: gforth - how to soytware trigger capslock
From: minforth@arcor.de (minforth)
Injection-Date: Thu, 07 Sep 2023 10:19:38 +0000
Content-Type: text/plain; charset="UTF-8"
 by: minforth - Thu, 7 Sep 2023 10:19 UTC

gobli...@gmail.com schrieb am Donnerstag, 7. September 2023 um 12:00:10 UTC+2:
> hello
>
> currently I use an externol tool to do this in gforth over gnulinux station.
>
> : caps ( -- ) s" xdotool key Caps_Lock" system ;
> \ triggers capslock just like pressing the key
>
> I'm looking for a forth solution to make it more forth & less xdotool dependant & even external applicatin independant.
>
> so I am looking for a solution to simulate by a word the capslock keypress.

Querying device status like num-lock or caps-lock is not part of the Forth world
but depends on your terminal and your OS.

IOW there is no generic fit-for-all solution.

Re: gforth - how to soytware trigger capslock

<70a43fb7-d173-4853-a7fb-f925f7ee0591n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:4b32:0:b0:64a:8826:d5f2 with SMTP id s18-20020ad44b32000000b0064a8826d5f2mr397592qvw.5.1694082515042;
Thu, 07 Sep 2023 03:28:35 -0700 (PDT)
X-Received: by 2002:a63:b511:0:b0:573:f9db:6b5 with SMTP id
y17-20020a63b511000000b00573f9db06b5mr845031pge.10.1694082514506; Thu, 07 Sep
2023 03:28:34 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 7 Sep 2023 03:28:33 -0700 (PDT)
In-Reply-To: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.97.113.101; posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 217.97.113.101
References: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <70a43fb7-d173-4853-a7fb-f925f7ee0591n@googlegroups.com>
Subject: Re: gforth - how to soytware trigger capslock
From: zbigniew2011@gmail.com (Zbig)
Injection-Date: Thu, 07 Sep 2023 10:28:35 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1833
 by: Zbig - Thu, 7 Sep 2023 10:28 UTC

> currently I use an externol tool to do this in gforth over gnulinux station.
>
> : caps ( -- ) s" xdotool key Caps_Lock" system ;
> \ triggers capslock just like pressing the key
> [..]
> ONLY FORTH ALSO ASSEMBLER
> code toto
> $3A # al mov
> $02 # ah mov
> $80 # int
> ret
> end-code
>
> that migth be also a solution but I failed as this creates a memory error on execution
>
> I failed to find more documentation or examples to fix it

Maybe examination — using gdb — what sequence of assembly commands
'xdotool key Caps_Lock' is sending, could give you the solution?

Re: gforth - how to soytware trigger capslock

<c0db4dec-06e8-400d-8ac9-b955e5b04b42n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:6214:1907:b0:64f:9386:a3a5 with SMTP id er7-20020a056214190700b0064f9386a3a5mr385846qvb.6.1694083407592;
Thu, 07 Sep 2023 03:43:27 -0700 (PDT)
X-Received: by 2002:a63:9846:0:b0:564:e80e:81c0 with SMTP id
l6-20020a639846000000b00564e80e81c0mr3928396pgo.2.1694083407278; Thu, 07 Sep
2023 03:43:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 7 Sep 2023 03:43:26 -0700 (PDT)
In-Reply-To: <75a26522-24bc-4094-80d5-812590a42c19n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:118:ea0:5652:e65:19aa:a256;
posting-account=3HjpJwoAAACwXD1UyRZwC1Lkp4Lq1jcg
NNTP-Posting-Host: 2a01:e0a:118:ea0:5652:e65:19aa:a256
References: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com> <75a26522-24bc-4094-80d5-812590a42c19n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c0db4dec-06e8-400d-8ac9-b955e5b04b42n@googlegroups.com>
Subject: Re: gforth - how to soytware trigger capslock
From: goblinrieur@gmail.com (gobli...@gmail.com)
Injection-Date: Thu, 07 Sep 2023 10:43:27 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2180
 by: gobli...@gmail.com - Thu, 7 Sep 2023 10:43 UTC

Le jeudi 7 septembre 2023 à 12:19:40 UTC+2, minforth a écrit :
> gobli...@gmail.com schrieb am Donnerstag, 7. September 2023 um 12:00:10 UTC+2:
> > hello
> >
> > currently I use an externol tool to do this in gforth over gnulinux station.
> >
> > : caps ( -- ) s" xdotool key Caps_Lock" system ;
> > \ triggers capslock just like pressing the key
> >
> > I'm looking for a forth solution to make it more forth & less xdotool dependant & even external applicatin independant.
> >
> > so I am looking for a solution to simulate by a word the capslock keypress.
> Querying device status like num-lock or caps-lock is not part of the Forth world
> but depends on your terminal and your OS.

Of course so that is why I used a specfic external command

>
> IOW there is no generic fit-for-all solution.

Re: gforth - how to soytware trigger capslock

<03089df4-36c3-4748-bbe4-95580d3b25c3n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:341:b0:410:839d:942c with SMTP id r1-20020a05622a034100b00410839d942cmr470627qtw.12.1694108391181;
Thu, 07 Sep 2023 10:39:51 -0700 (PDT)
X-Received: by 2002:a17:902:d48d:b0:1bb:b30e:436d with SMTP id
c13-20020a170902d48d00b001bbb30e436dmr85639plg.4.1694108390886; Thu, 07 Sep
2023 10:39:50 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 7 Sep 2023 10:39:50 -0700 (PDT)
In-Reply-To: <70a43fb7-d173-4853-a7fb-f925f7ee0591n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:118:ea0:5652:e65:19aa:a256;
posting-account=3HjpJwoAAACwXD1UyRZwC1Lkp4Lq1jcg
NNTP-Posting-Host: 2a01:e0a:118:ea0:5652:e65:19aa:a256
References: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com> <70a43fb7-d173-4853-a7fb-f925f7ee0591n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <03089df4-36c3-4748-bbe4-95580d3b25c3n@googlegroups.com>
Subject: Re: gforth - how to soytware trigger capslock
From: goblinrieur@gmail.com (gobli...@gmail.com)
Injection-Date: Thu, 07 Sep 2023 17:39:51 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 2172
 by: gobli...@gmail.com - Thu, 7 Sep 2023 17:39 UTC

Le jeudi 7 septembre 2023 à 12:28:36 UTC+2, Zbig a écrit :
> > currently I use an externol tool to do this in gforth over gnulinux station.
> >
> > : caps ( -- ) s" xdotool key Caps_Lock" system ;
> > \ triggers capslock just like pressing the key
> > [..]
> > ONLY FORTH ALSO ASSEMBLER
> > code toto
> > $3A # al mov
> > $02 # ah mov
> > $80 # int
> > ret
> > end-code
> >
> > that migth be also a solution but I failed as this creates a memory error on execution
> >
> > I failed to find more documentation or examples to fix it
> Maybe examination — using gdb — what sequence of assembly commands
> 'xdotool key Caps_Lock' is sending, could give you the solution?

it is a good idea in concept but it cannot wark gbd run can dipay asm code only from the .o object file :)

Re: gforth - how to soytware trigger capslock

<b69ef1d5-2327-4ba8-b540-7c97b79519d0n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:b:b0:412:26be:4642 with SMTP id x11-20020a05622a000b00b0041226be4642mr4331qtw.2.1694110804491;
Thu, 07 Sep 2023 11:20:04 -0700 (PDT)
X-Received: by 2002:a17:902:c40b:b0:1b5:147f:d8d1 with SMTP id
k11-20020a170902c40b00b001b5147fd8d1mr161326plk.3.1694110804232; Thu, 07 Sep
2023 11:20:04 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Thu, 7 Sep 2023 11:20:03 -0700 (PDT)
In-Reply-To: <03089df4-36c3-4748-bbe4-95580d3b25c3n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=217.97.113.101; posting-account=cxuXKwoAAABQpPOMD55A9IPz7pPrw6ml
NNTP-Posting-Host: 217.97.113.101
References: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
<70a43fb7-d173-4853-a7fb-f925f7ee0591n@googlegroups.com> <03089df4-36c3-4748-bbe4-95580d3b25c3n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b69ef1d5-2327-4ba8-b540-7c97b79519d0n@googlegroups.com>
Subject: Re: gforth - how to soytware trigger capslock
From: zbigniew2011@gmail.com (Zbig)
Injection-Date: Thu, 07 Sep 2023 18:20:04 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Zbig - Thu, 7 Sep 2023 18:20 UTC

> it is a good idea in concept but it cannot wark gbd run can dipay asm code only from the .o object file :)

We're talking about Open Source Software;
you can create the object file easily. :)

Re: gforth - how to soytware trigger capslock

<1334355e-b0af-4b4a-97c5-ae341e0ec5f1n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:ad4:5902:0:b0:635:e9f6:9470 with SMTP id ez2-20020ad45902000000b00635e9f69470mr192905qvb.5.1694228825290;
Fri, 08 Sep 2023 20:07:05 -0700 (PDT)
X-Received: by 2002:a17:902:e748:b0:1c0:bf60:ba51 with SMTP id
p8-20020a170902e74800b001c0bf60ba51mr1473869plf.3.1694228824765; Fri, 08 Sep
2023 20:07:04 -0700 (PDT)
Path: rocksolid2!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Fri, 8 Sep 2023 20:07:03 -0700 (PDT)
In-Reply-To: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=63.158.165.131; posting-account=OxDKOgoAAADW0cxAqHqpN1zqeCoSsDap
NNTP-Posting-Host: 63.158.165.131
References: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <1334355e-b0af-4b4a-97c5-ae341e0ec5f1n@googlegroups.com>
Subject: Re: gforth - how to soytware trigger capslock
From: hughaguilar96@gmail.com (Hugh Aguilar)
Injection-Date: Sat, 09 Sep 2023 03:07:05 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1325
 by: Hugh Aguilar - Sat, 9 Sep 2023 03:07 UTC

I notice that the OP wrote "soytware" rather than "software."
On the Dvorak keyboard, the Y and F are adjacent, but not on the Qwerty,
so I assume that a Dvorak keyboard was being used.

Re: gforth - how to soytware trigger capslock

<8fb9fe7c-13c0-4be8-aa39-c6c0d7c37ad4n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:620a:14d:b0:76e:edb1:f395 with SMTP id e13-20020a05620a014d00b0076eedb1f395mr104548qkn.6.1694277230523;
Sat, 09 Sep 2023 09:33:50 -0700 (PDT)
X-Received: by 2002:aa7:88d1:0:b0:68e:36b1:3d8c with SMTP id
k17-20020aa788d1000000b0068e36b13d8cmr2252227pff.2.1694277229918; Sat, 09 Sep
2023 09:33:49 -0700 (PDT)
Path: rocksolid2!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 9 Sep 2023 09:33:49 -0700 (PDT)
In-Reply-To: <1334355e-b0af-4b4a-97c5-ae341e0ec5f1n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:118:ea0:e23f:49ff:fed4:3289;
posting-account=3HjpJwoAAACwXD1UyRZwC1Lkp4Lq1jcg
NNTP-Posting-Host: 2a01:e0a:118:ea0:e23f:49ff:fed4:3289
References: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com> <1334355e-b0af-4b4a-97c5-ae341e0ec5f1n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8fb9fe7c-13c0-4be8-aa39-c6c0d7c37ad4n@googlegroups.com>
Subject: Re: gforth - how to soytware trigger capslock
From: goblinrieur@gmail.com (gobli...@gmail.com)
Injection-Date: Sat, 09 Sep 2023 16:33:50 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: gobli...@gmail.com - Sat, 9 Sep 2023 16:33 UTC

Le samedi 9 septembre 2023 à 05:07:06 UTC+2, Hugh Aguilar a écrit :
> I notice that the OP wrote "soytware" rather than "software."
> On the Dvorak keyboard, the Y and F are adjacent, but not on the Qwerty,
> so I assume that a Dvorak keyboard was being used.

exact :)

Re: gforth - how to soytware trigger capslock

<b050516a-06d2-413d-be81-670e44738838n@googlegroups.com>

  copy mid

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

  copy link   Newsgroups: comp.lang.forth
X-Received: by 2002:a05:622a:1aa1:b0:410:6b0:c975 with SMTP id s33-20020a05622a1aa100b0041006b0c975mr111351qtc.9.1694277541243;
Sat, 09 Sep 2023 09:39:01 -0700 (PDT)
X-Received: by 2002:a63:7b4b:0:b0:565:e467:ef5e with SMTP id
k11-20020a637b4b000000b00565e467ef5emr1158828pgn.5.1694277540741; Sat, 09 Sep
2023 09:39:00 -0700 (PDT)
Path: rocksolid2!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.forth
Date: Sat, 9 Sep 2023 09:39:00 -0700 (PDT)
In-Reply-To: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a01:e0a:118:ea0:e23f:49ff:fed4:3289;
posting-account=3HjpJwoAAACwXD1UyRZwC1Lkp4Lq1jcg
NNTP-Posting-Host: 2a01:e0a:118:ea0:e23f:49ff:fed4:3289
References: <f19ad680-4d2d-4ed5-86e8-5b000b6fd88cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b050516a-06d2-413d-be81-670e44738838n@googlegroups.com>
Subject: Re: gforth - how to soytware trigger capslock
From: goblinrieur@gmail.com (gobli...@gmail.com)
Injection-Date: Sat, 09 Sep 2023 16:39:01 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 6330
 by: gobli...@gmail.com - Sat, 9 Sep 2023 16:39 UTC

Le jeudi 7 septembre 2023 à 12:00:10 UTC+2, gobli...@gmail.com a écrit :
> hello
>
> currently I use an externol tool to do this in gforth over gnulinux station.
>
> : caps ( -- ) s" xdotool key Caps_Lock" system ;
> \ triggers capslock just like pressing the key
>
> I'm looking for a forth solution to make it more forth & less xdotool dependant & even external applicatin independant.
>
> so I am looking for a solution to simulate by a word the capslock keypress.
>
> I ve been guided to https://www.complang.tuwien.ac.at/forth/gforth/Docs-html/386-Assembler.html#g_t386-Assembler and https://gforth.org/manual/AMD64-Assembler.html abi-code solution
>
> then I tried
>
> ONLY FORTH ALSO ASSEMBLER
> code toto
> $3A # al mov
> $02 # ah mov
> $80 # int
> ret
> end-code
>
> that migth be also a solution but I failed as this creates a memory error on execution
>
> I failed to find more documentation or examples to fix it
>
> any pure forth idea ?
> any abi-code idea or fix ?
> any documentation about the specific abi-code inside gforth ?
>
> thanks

I 've been stupid stupid
of course toupper was not working
'toupper' ( c1 -- c2 ) gforth-0.2 "toupper"
'accept' ( c-addr +n1 -- +n2 ) core "accept"

that is the point
so I just have to make toupper from another intermediary word addr len compatible

+ 110 \ need a specific input to get capitalized
+ 111 : $INPUT ( -- addr len) PAD DUP 16 ACCEPT ;
+ 112 \ convert a string in place. (not always good)
+ 113 : >UPPER ( addr len -- addr len)
+ 114 2DUP \ dup the string
+ 115 BOUNDS \ convert last-addr 1st-addr
+ 116 DO \ do loop counts from 1st to last char
+ 117 I C@ \ read the char from address 'I'
+ 118 TOUPPER \ convert character to upper case
+ 119 I C! \ store char back into the address
+ 120 LOOP ;
121 : isnum?
122 ." next number ? "
~ 123 pad dup 16 $INPUT >UPPER \ ask for an user input now works even lower cases
124 s>number? IF \ already an integer ?
\ etc etc

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor