Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Marvelous! The super-user's going to boot me! What a finely tuned response to the situation!


devel / comp.os.ms-windows.programmer.win32 / Re: DirectX - how to get DirectInput keyboard CapsLock state ?

SubjectAuthor
* DirectX - how to get DirectInput keyboard CapsLock state ?R.Wieser
`* DirectX - how to get DirectInput keyboard CapsLock state ?JJ
 `- DirectX - how to get DirectInput keyboard CapsLock state ?R.Wieser

1
DirectX - how to get DirectInput keyboard CapsLock state ?

<tjme7n$9jd$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1128&group=comp.os.ms-windows.programmer.win32#1128

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: DirectX - how to get DirectInput keyboard CapsLock state ?
Date: Sun, 30 Oct 2022 19:02:23 +0100
Organization: Aioe.org NNTP Server
Lines: 23
Message-ID: <tjme7n$9jd$1@gioia.aioe.org>
Injection-Info: gioia.aioe.org; logging-data="9837"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
X-RFC2646: Format=Flowed; Original
X-Notice: Filtered by postfilter v. 0.9.2
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-Priority: 3
X-MSMail-Priority: Normal
 by: R.Wieser - Sun, 30 Oct 2022 18:02 UTC

Hello all,

I'm doing some DirectX using DirectInput, which works nicely. But I would
like to be able to get the current state of the, for instance, CapsLock key.

I came as far as the DIOBJECTDATAFORMAT struct and its flags
(DIDFT_PSHBUTTON, DIDFT_TGLBUTTON and DIDFT_BUTTON), but have not been able
to figure out how to use them to retrieve (or create!) a toggle key.

Hence my question :

1) Is it actually possible to access (or create) a toggle key thru
DirectX-es DirectInput mechanism ?

2) If so, how do I go about it ?

Mind you, I already got some code to create a toggle from a non-toggeling
key. Thats not what I'm asking for. :-)

Regards,
Rudy Wieser

Re: DirectX - how to get DirectInput keyboard CapsLock state ?

<1mbm84u2m90pp$.tdpd62c2x71t$.dlg@40tude.net>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1129&group=comp.os.ms-windows.programmer.win32#1129

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: jj4public@outlook.com (JJ)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: DirectX - how to get DirectInput keyboard CapsLock state ?
Date: Mon, 31 Oct 2022 08:43:47 +0700
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <1mbm84u2m90pp$.tdpd62c2x71t$.dlg@40tude.net>
References: <tjme7n$9jd$1@gioia.aioe.org>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Injection-Info: reader01.eternal-september.org; posting-host="de5b02d92aa92c564662c2c305d00e9c";
logging-data="351306"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+012Y0r7fkHiabc3CEBBlKRr1FZfh1m/o="
User-Agent: 40tude_Dialog/2.0.15.84
Cancel-Lock: sha1:/jkb6uoM1QswYdEwjyRpcMs7NsU=
X-Bitcoin: 1LcqwCQBQmhcWfWsVEAeyLchkAY8ZfuMnS
X-Face: \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pa d{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl
 by: JJ - Mon, 31 Oct 2022 01:43 UTC

On Sun, 30 Oct 2022 19:02:23 +0100, R.Wieser wrote:
> Hello all,
>
> I'm doing some DirectX using DirectInput, which works nicely. But I would
> like to be able to get the current state of the, for instance, CapsLock key.
>
> I came as far as the DIOBJECTDATAFORMAT struct and its flags
> (DIDFT_PSHBUTTON, DIDFT_TGLBUTTON and DIDFT_BUTTON), but have not been able
> to figure out how to use them to retrieve (or create!) a toggle key.
>
> Hence my question :
>
> 1) Is it actually possible to access (or create) a toggle key thru
> DirectX-es DirectInput mechanism ?
>
> 2) If so, how do I go about it ?
>
> Mind you, I already got some code to create a toggle from a non-toggeling
> key. Thats not what I'm asking for. :-)
>
> Regards,
> Rudy Wieser

Haven't actually tested it, but isn't DInput's `GetDeviceState()` return the
same data as WinAPI's `GetKeyboardState()`? i.e. MSB = pressed, LSB =
toggle.

Re: DirectX - how to get DirectInput keyboard CapsLock state ?

<tjnqjc$iif$1@gioia.aioe.org>

  copy mid

https://news.novabbs.org/devel/article-flat.php?id=1130&group=comp.os.ms-windows.programmer.win32#1130

  copy link   Newsgroups: comp.os.ms-windows.programmer.win32
Path: i2pn2.org!i2pn.org!aioe.org!XakcSTEO51npqVb7OVl71w.user.46.165.242.75.POSTED!not-for-mail
From: address@not.available (R.Wieser)
Newsgroups: comp.os.ms-windows.programmer.win32
Subject: Re: DirectX - how to get DirectInput keyboard CapsLock state ?
Date: Mon, 31 Oct 2022 07:39:14 +0100
Organization: Aioe.org NNTP Server
Lines: 23
Message-ID: <tjnqjc$iif$1@gioia.aioe.org>
References: <tjme7n$9jd$1@gioia.aioe.org> <1mbm84u2m90pp$.tdpd62c2x71t$.dlg@40tude.net>
Injection-Info: gioia.aioe.org; logging-data="19023"; posting-host="XakcSTEO51npqVb7OVl71w.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Newsreader: Microsoft Outlook Express 6.00.2900.5512
X-MSMail-Priority: Normal
X-Notice: Filtered by postfilter v. 0.9.2
X-Priority: 3
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512
 by: R.Wieser - Mon, 31 Oct 2022 06:39 UTC

JJ,

>> 1) Is it actually possible to access (or create) a toggle key thru
>> DirectX-es DirectInput mechanism ?
>>
>> 2) If so, how do I go about it ?
....
> Haven't actually tested it, but isn't DInput's `GetDeviceState()` return
> the same data as WinAPI's `GetKeyboardState()`? i.e. MSB = pressed, LSB =
> toggle.

Thats what I assumed too. But as I did not get the expected result I
displayed the involved byte. Alas, no change of any bit other than the MSB.

Double checked it with DIK_SCROLL and DIK_NUMLOCK and got the same result.

Hence my idea that I should perhaps change something in the
DIOBJECTDATAFORMAT declaration of the involved key(s).

Regards,
Rudy Wieser

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor