WorldViz User Forum

WorldViz User Forum (
-   Vizard (
-   -   vizinput disables keyboard? (

fivel_lab 01-26-2015 07:15 PM

vizinput disables keyboard?
OK another weird one... We are finding that after a script executes vizinput.choose (or vizinput.input), the keyboard is disabled so that any keydown events (including ESC) don't get detected. For example, the following code works just fine until the commented line is un-commented:


import vizinput
import viz
import vizshape
import vizact

def setVisibility(blah):


#vizinput.choose('blah', ['fsdg','sd'])
theball = vizshape.addCircle()
vizact.onkeydown('n', setVisibility, viz.TOGGLE)

no clue how to solve this one.. :eek:

Jeff 01-29-2015 02:44 AM

The vizinput dialogs create a blocking action which will halt rendering and events. If you want the user to make selections while the script runs normally you can use one of Vizard's other GUI libraries. Does this work for you?


import vizinfo
import viz
import vizshape


info = vizinfo.InfoPanel('Press n to toggle visibility of the ball')
dropdown = info.addLabelItem('blah',viz.addDropList())

theball = vizshape.addCircle(pos=[0,1.5,5])
vizact.onkeydown('n', theball.visible, viz.TOGGLE)

All times are GMT -7. The time now is 09:32 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Copyright 2002-2018 WorldViz LLC