UnderwareDESIGN

PlayBASIC => Beginners => Topic started by: Draco9898 on October 28, 2005, 06:55:56 AM

Title: Scancode -> Ascii code?
Post by: Draco9898 on October 28, 2005, 06:55:56 AM
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$()?
Title: Scancode -> Ascii code?
Post by: kevin on October 28, 2005, 07:01:42 AM
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.
Title: Scancode -> Ascii code?
Post by: Draco9898 on October 28, 2005, 07:03:38 AM
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
Title: Scancode -> Ascii code?
Post by: empty on October 28, 2005, 08:09:56 AM
I've posted in example that shows how to retrieve the name of keys here:
Key names from Scancode  (http://www.underwaredesign.com/forums/index.php?topic=858.0)