News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Scancode -> Ascii code?

Started by Draco9898, October 28, 2005, 06:55:56 AM

Previous topic - Next topic

Draco9898

Any easy way to do this? I'm trying to show the user what key he/she pressed in a string /acii form?

Oh I'm being silly, just use Inkey$...my bad :) trying to make it more complicated then I thought. But I'm still wondering because I'm storing keys using Scancodes and need to show these scancodes like inkey$()?
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

kevin

I've got a code (some palce) that converts scancodes to Key Names.  Which would be useful for allowing users to customize controls

The problem with using INkey$() for that would be it only returns ASCII codes.  All though keys return nothing.

Draco9898

#2
That's exactly what I'm doing kevin, custom controls...Considering most people are probably going to find the layout I like a tad wackey...
I guess I could just store both Scancode and inkey versions...or I could make a giant look-up table :P
DualCore Intel Core 2 processor @ 2.3 ghz, Geforce 8600 GT (latest forceware drivers), 2 gigs of ram, WIN XP home edition sp2, FireFox 2.

"You'll no doubt be horrified to discover that PlayBasic is a Programming Language." -Kevin

empty

#3
I've posted in example that shows how to retrieve the name of keys here:
Key names from Scancode