If you have used the mouse at all during the last 300 events then `C-x C-k l' (`kmacro-edit-lossage') is broken: it just raises an error, rather than showing you your keyboard events as a keyboard macro and letting you edit the macro. That's not very helpful. This happens because `edmacro-fix-menu-commands' just punts, not bothering to try to handle mouse events the same way it handles events such as help-echo and switch-frame events. The attached patch fixes that. It also makes the error message explicit about any unsupported event, instead of assuming that every unsupported event is necessarily a mouse event. In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32) of 2018-05-30 Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea Windowing system distributor `Microsoft Corp.', version 10.0.16299 Configured using: `configure --without-dbus --host=x86_64-w64-mingw32 --without-compress-install 'CFLAGS=-O2 -static -g3''