CommandKeyDown whichKey - how do I easily reference keypad numbers on Mac
J. Landman Gay
jacque at hyperactivesw.com
Tue Jan 17 00:09:59 EST 2012
On 1/16/12 9:26 PM, J. Landman Gay wrote:
> On Jan 16, 2012, at 3:17 PM, Alan Gayne wrote:
>
>> No issue at all when "whichKey" is one of the numbers at the top of
>> the QUERTY keyboard, but when I try to use the commandKeyDown number
>> combination using the numbers on the extended keyboard keypad it
>> didn't work.
>
> You could do a quick translation at the top of the commandkeydown
> handler and then proceed as usual:
>
> on commandkeydown whichKey
> put
> itemoffset(whichKey,"65436,65433,65435,65430,65437,65432,65429,65431,65434")
> into tNum
> if tNum > 0 then put tNum into which
> switch whichKey
> case 1
> etc...
>
I forgot zero. If you need it:
put
itemoffset(whichKey,"65438,65436,65433,65435,65430,65437,65432,65429,65431,65434")
into tNum
if tNum > 0 then put tNum-1 into whichKey
--
Jacqueline Landman Gay | jacque at hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
More information about the use-livecode
mailing list