[REBOL] Re: Intercept key press
From: anton:lexicon at: 13-Dec-2002 17:08
Hi Davide,
This example modifies the feel of the window face:
view/new lay: layout [
my-field: field my-field2: field
]
lay/feel: make lay/feel [
detect: func [face event][
if event/type = 'key [
print [
event/key
all [
system/view/focal-face
system/view/focal-face/var
]
]
]
event ; return the event
]
]
wait none
(view sets the window feel, that's why you need to
specifically view/new, set your feel,
then wait for events afterwards.)
Anton.