April 25, 2019, 04:20:25 AM

Author Topic: KeyDown and Capslock?  (Read 87 times)

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 171
  • Whoop-de-doo-ba-dooo!
KeyDown and Capslock?
« on: April 13, 2019, 09:23:48 AM »
Is there a key value for CAPS LOCK?  I don't see anything for Keyhit/KeyDown.

Offline Derron

  • Hero Member
  • *****
  • Posts: 1953
Re: KeyDown and Capslock?
« Reply #1 on: April 13, 2019, 09:28:21 AM »
KEY_CAPSLOCK


For Windows OS you could use their API to request the current state of the caps lock: GetKeyStateA( keyState )

bye
Ron

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 171
  • Whoop-de-doo-ba-dooo!
Re: KeyDown and Capslock?
« Reply #2 on: April 13, 2019, 09:48:53 AM »
KEY_CAPSLOCK


For Windows OS you could use their API to request the current state of the caps lock: GetKeyStateA( keyState )

bye
Ron

I'm using the latest NG; I don't have a KEY_CAPSLOCK definition in polled input.

Offline Henri

  • Full Member
  • ***
  • Posts: 187
Re: KeyDown and Capslock?
« Reply #3 on: April 13, 2019, 10:27:45 AM »
You can define it yourself then:

Code: BlitzMax
  1. Const KEY_CAPSLOCK:int = 20

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Offline Yellownakji

  • Full Member
  • ***
  • Posts: 171
  • Whoop-de-doo-ba-dooo!
Re: KeyDown and Capslock?
« Reply #4 on: April 13, 2019, 10:35:03 PM »
You can define it yourself then:

Code: BlitzMax
  1. Const KEY_CAPSLOCK:int = 20

-Henri

Thank you.    Is there a way to return the last key hit?

Offline Derron

  • Hero Member
  • *****
  • Posts: 1953
Re: KeyDown and Capslock?
« Reply #5 on: April 13, 2019, 10:49:02 PM »
No.

But you could scan an archive keyhit states on your own.

Bye
Ron