Toggle not changing when focus on jit.pwindow

hcenteno's icon

Hi,

I'm trying to change a toggle object by pressing a key but the toggle stops changing as soon as I click on a jit.pwindow object.

See example below: First click on any white area in the patcher and press the space bar. The toggle should change. Then click on the pwindow and press the space bar. The toggle doesn't change even though the key object is working, as shown by the bang. I'm using Max 6.1.3. I found that the jit.pwindow can even be in a different patcher for this to happen. I need this to work since my project requires to click on a pwindow while triggering events with the keyboard.

Can anyone else reproduce this?

Thanks,

Max Patch
Copy patch and select New From Clipboard in Max.

Hector

hcenteno's icon

Ah! On further investigation, it seems that the key object is sending duplicated key numbers when the pwindow object is clicked. I confirmed this by attaching a print object to key.

Rob Ramirez's icon

hi.
thanks for the report. i can confirm and we'll take a look as to why this is happening.

Max Patch
Copy patch and select New From Clipboard in Max.

in the meantime, your best bet might be to create an abstraction using change and keyup, to filter the duplicates: