CommandKeyDown whichKey - how do I easily reference keypad numbers on Mac

J. Landman Gay jacque at hyperactivesw.com
Mon Jan 16 22:26:54 EST 2012


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...

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list