An actor is in fact a combination of an event name and a function that takes some arguments, principally the widget on which the event occurs and the event itself. The following code snippet shows how to detect when certain keys are pressed:
;-- see Chapter09/key-detecting.red:view/options [ t: text "hit 'space', 'a', or '?' keys !"][ actors: object [on-key: func [key event] [ if event/key = #"a" [t/text: "'a' key pressed."] if event/key = #"?" [t/text: "'?' key pressed."] if event/key = #" " [t/text: "'space bar'pressed."] ] ]]