PlanetSquires Forums

Support Forums => José Roca Software => Topic started by: Bumblebee on November 14, 2021, 01:07:01 PM

Title: Question about KeyChar and KeyCode
Post by: Bumblebee on November 14, 2021, 01:07:01 PM
Pressing the DEL key returns code 46. This doesn't match the ASCII chart, which is 127.
Other keys return codes that are the same as ASCII.

Where can I find a list that documents KeyChar and KeyCode ?
Title: Re: Question about KeyChar and KeyCode
Post by: Johan Klassen on November 14, 2021, 03:41:16 PM
hello Bumblebee, I think this will help https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
Title: Re: Question about KeyChar and KeyCode
Post by: Bumblebee on November 14, 2021, 04:24:54 PM
Thank-you!

So KeyCode is VK_DELETE = 46 and KeyChar is ASCII 46 which is the decimal point or period.

Until recently, I believed the KeyPress function was returning the DEL key, but this was actually the decimal point with Numlock on.