Yes, there's no raw key access on MacOS

Why not code around it? Much as I'd like RunRev to respond to each and every request, it makes sense for them to fix the things we cannot do, rather than doing it the way we'd like.

In the stack script:
---------------------------------
on openStack
  keysensor
end openStack

on keysensor
  if shiftKey() is down then
    send "rawKeyDown "&65505 to this card in 0 milliseconds
  end if
  if controlKey() is down then
    -- set this code "right"
    send "rawKeyDown "&65506 to this card in 0 milliseconds       
  end if  if commandKey() is down then
    -- set this code "right"
    send "rawKeyDown "&65507 to this card in 0 milliseconds       
  end if  if shiftKey() is down then
    -- set this code "right"
    send "rawKeyDown "&65508 to this card in 0 milliseconds       
  end if

  -- change this to tradeoff cpu usage/responsiveness
  send "keysensor" to me in 200 milliseconds
end keysensor
---------------------------------

On your card, create a field called 'log' with 20 or more lines, and put this code in the card's script:
---------------------------------
on rawKeyDown RAWK
  put the milliseconds&" "&RAWK&cr before field log
  put (line 1 to 20 of field "log") into field "log"
end rawKeyDown
---------------------------------

Doesn't that accomplish most of what you wanted in an admittedly bass-ackwards way?

-Ken

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to