Support Forums > WinFBX - Windows Framework for FreeBASIC

Question about KeyChar and KeyCode

(1/1)

Bumblebee:
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 ?

Johan Klassen:
hello Bumblebee, I think this will help https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes

Bumblebee:
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.

Navigation

[0] Message Index

Go to full version