chuntaro / emacs-keypression

Keystroke visualizer for GUI version Emacs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Limit to keyboard events

perstar opened this issue · comments

I suggest that only keyboard events are mentioned, not <mouse-movement>, <menu-bar>, <switch-frame> etc., which are generally not useful to see in a screencast.

Thus should be an option. Drag events for example can be useful to see. Also an option to enlarge the mouse cursor would help to make it visible in presentations.

It's think you are right in that it's possible there can be some other events that can be useful sometimes, but I think that should be exceptions in that case. Just showing everything isn't really useful if you do a lot of mousing, whereas it seems natural to say that keypression is for showing key events. For example having

<menu-bar> <help-menu> <about-emacs>

logged doesn't help anyone. People watching saw that you chose Help>About Emacs in the menus anyway.
But the main problem is that there sometimes are so many events so other things are drowned out. You mention drag events. A simple mouse-set-region with drag-mouse-1 now actually generates

<down-mouse-1>
<mouse-movement>
<mouse-movement>
<mouse-movement>
<mouse-movement>
<mouse-movement> ...
<drag-mouse-1>

mouse-movement not the only event that is mostly noise.

Removed mouse event noise and added defcustom!

Aren’t you missing the down events of mouse1-3? Maybe the event-basic-type handles this.

I would prefer 2 defcustoms, one boolean to turn the setting on and off and another to specify the list of events to filter out.

I'm using the event-basic-type function, so this is fine.
If you use (setq keypression-ignore-mouse-events nil), all events will be displayed, so I think this is good.

I would still prefer to limit keypression to keyboard events. Of the three examples I gave in my original report mouse-movement events are now filtered out by default, but not menu-bar or switch-frame. (Other examples are tool-bar events and tab-bar events.)

I agree with @perstar, switch-frame event is quite annoying...