DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Watch Key Events Snippet

01.18.2006
| 2215 views |
  • submit to reddit
        
view/new layout [
	the-box: field "A Box" forest feel [
		engage: func [face action event] [
			if action = 'key [
				either word? event/key [
					print ["Special key:" event/key]
				][
					print ["Normal key:" mold event/key]
				]
			]
		]
	]
]
focus the-box
do-events