I would like to try to understand the weird logic of Rawkey.
Why not using regular ASCII values ?
My point : Rawkey uses (apparently) a code of 5 digits for special keys and 2 or 3 digits for regular characters.
For instance 65293 for CR (carriage return).
Where I can find an equivalence table ASCII <-> Rawkey system ?
I'm using a barcode scanner with special prefix and sufix. This system uses regular ASCII (extended). For instance, I set ASCII(160) as my prefix.
So to summarize :
-I'm able to catch the rawkey codes. But my problem is after : how decode them in regular ASCII ?
Equivalences ASCII <-> Rawkey for barcodes scanner
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
The problem is that ASCII is equal on all platforms only for very few control chars (like return, space and the most basic sentence signs) english chars and zero to nine. After that, it's open to guessing what a certain number actually will result in for the user. Therefore it's best to create your list yourself. The easiest way would be to make a list of the chars you'll actually use, and the ACSCII representing them on the barcode scanner. Then you could do something like this (untested):
Of course the example given is a bit boring, but for more interesting characters, the numbers will be different.
Code: Select all
--assuming a list of <char>,<asciinumber>
on mosueUp
repeat for each line theLine in field "asciiList"
put chartonum(item 1 of theLine) into conversionArray[item 2 of theLine]
end repeat
put conversionArray[65]--should be the same, 65
put numtochar(conversionArray[65]) --rev equivalent of ascii 65 = A
end mouseUp
Various teststacks and stuff:
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode
http://bjoernke.com
Chat with other RunRev developers:
chat.freenode.net:6666 #livecode