View Single Post
  #2  
Old 10-09-2017, 02:05 PM
Jeff Jeff is offline
WorldViz Team Member
 
Join Date: Aug 2008
Posts: 2,466
Here is a simple example:

Code:
import viz
import viztask

viz.go()

def keytask():
	
	while True:
		d = yield viztask.waitKeyDown(None) 
		key = d.key 
		if key == 'j': 
			print 'j pressed' 
		else: 
			print 'some other key pressed'
		
viztask.schedule( keytask() )
Reply With Quote