[futurebasic] Re: [FB] key combination for ascii char

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : March 2001 : Group Archive : Group : All Groups

From: Robert Purves <robert.purves@...>
Date: Wed, 7 Mar 2001 14:49:21 +1300
>
>Is there a way (other than brute force select case) to return the key
>combination for a given ascii character?
>For example:
>copyright=option-G
>omega=option-Z
>degree =option-shift-8

What about a lookup table? Here I have filled in only three entries, enough
for you to get the idea.

dim gKeyPress(255) as Str15

local fn SetUpKeyPressInfo
//...
gKeyPress(128) = "opt-U shift-A"
//...
gKeyPress(169) = "opt-G"
//...
gKeyPress(184) = "opt-shift-P"
//...
end fn


Then the key-press of theChar is gKeyPress(theChar)


Robert P.