Can't get lower case "q" to quit (Documentation Bugs and Problems)

by Han Jong Juan @, Singapore, Friday, December 28, 2012, 02:49 (1578 days ago)

do

keypress=key()

print keypress
pause 1

until keypress = 113 # "q" to quit

I am trying to quit this do..until loop. but I don't seem to be able to get lower case letter from key().

Basic256 version : 0.9.9.23(2012-11-25)
OS version : MS Win XP Home SP3

Thanks for bring basic256... making programming so much fun.

Han Jong Juan

Can't get lower case "q" to quit

by Jim ⌂ @, Russell, KY, Friday, December 28, 2012, 13:35 (1578 days ago) @ Han Jong Juan

OK, here is the answer to that one.

BASIC256 uses the QT keyPress event to save the "keycode" of the last key that was pressed. This key code is a raw key number and not the ASCII/UNICODE value the key will produce on input. This allows BASIC256 to capture the shift. control, and other keys. See http://doc.qt.digia.com/qt/qt.html#Key-enum for a listing of the keys and codes.

Jim

Can't get lower case "q" to quit

by Han Jong Juan @, Singapore, Saturday, December 29, 2012, 23:57 (1577 days ago) @ Jim

Thanks Jim.

Han Jong Juan

RSS Feed of thread
powered by my little forum