On Sat, Nov 02, 2024 at 09:38:20AM GMT, Eli Zaretskii wrote: > (This should not surprise anyone, because input events are handled in > C, not in Lisp, and so disabling this in Lisp is expected to be > impossible.) Well, everyone I talked to was sure it must be possible in Lisp, so I figured somebody would ask eventually. > Thanks, but this is not enough, and I also think it doesn't > necessarily ignore the mouse events on the right level. We should > instead ignore these events where they are read, here: It was clearly enough for you to tell me I was doing it the Stupid Way, which was my objective, so I don't see the problem. I mean, obviously you're not going to merge what I sent. That wasn't the point. > This loop should ignore and remove from the queue any events whose > 'kind' (as declared in termhooks.h) is a mouse or touchpad event. And > perhaps we also should allow ignoring the latter, but not the former. Sounds reasonable. I'll take another look soon. > Otherwise, the "ignored" input events will act like ghosts: they do > exist in the queue, and do trigger input-even related mechanisms we > have, such as while-no-input, but cannot be accessed. I can't tell if this issue is supposed to be a consequence of not implementing ignore-touchpad-but-not-mouse, or of ignoring the events the way I was doing it (via the goto in read_key_sequence). > In addition, we'd need to change display-mouse-p, so that it reflects > the fact that mouse clicks are not available. Otherwise, some > features will present mouse-driven UI that cannot be used. Good point. I'm thoroughly ignorant of emacs' mouse-driven UI. > > + DEFVAR_LISP ("ignore-mouse-input", ignore_mouse_input, > > + doc: /* If non-nil, discard mouse input in the command loop */); > > + ignore_mouse_input = Qnil; > > This should be DEFVAR_BOOL instead. Okay, wasn't certain about that. It was also suggested to me that other devs would want the feature exposed via a global minor mode, not just a variable. Do you? I looked into it and it was about 10 lines of Lisp (most of which was to allow it to be set via customize), so that's not a big deal if so. Or I mean probably not; maybe I'll discover it's much worse in practice once I know what's actually involved. Thanks for the info.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4