DirectEntry Without the Standard Mouse-Watcher?

Does the DirectEntry class rely specifically on the standard “Mouse-Watcher” object (i.e. “base.mouseWatcher”) in order to receive text? And if so, is there a way to gain text-input in a DirectEntry when using a different watcher? (Other, I suppose, than binding the various DGG events (TYPE, ERASE, etc.).)

To explain:

I have a menu-system that allows the player to optionally navigate via keyboard instead of via mouse.

Now, if I leave the standard mouse-watcher in place, mouse-events sometimes interfere with navigation. To deal with this, I stash the default mouse-watcher when the player begins navigating via keyboard (or other non-mouse input-device), and unstash it when they subsequently begin navigating by mouse again.

However, this seems to result in DirectEntry objects becoming inoperable when navigating by keyboard: they no longer receive text.

I’m thus looking for a way around this, and hoping that it doesn’t involve manually binding various events…

Yes, it does rely on the mouse watcher.

The way it works is that the DirectEntry (and therefore the underlying PGEntry) is parented to a scene graph underneath a PGTop (such as aspect2d), which has the mouse watcher assigned.

If you wanted to use a different mouse watcher with a DirectEntry, you need to change the MouseWatcher object associated with the PGTop object that it’s parented to, such as:

base.aspect2d.node().setMouseWatcher(mw.node())

Maybe you could instead find a different way to disable the mouse inputs.

Ah, that is a pity!

It’s a possibility, I suppose…

Hmm… As mentioned in my prior thread on that topic, I did try using a new MouseWatcherRegion–but to no avail. Still, it’s possible that I didn’t apply that approach correctly.

One thought that has occurred to me is to temporarily unstash the default mouse-watcher when a DirectEntry is selected. I haven’t yet tried this, and it might lead to problems stemming from mouse-inputs, but it seems like it should otherwise work…