Hello! A few co-workers of mine discovered some very odd behavior with the desktop version of Excel when copying and cutting content.
If you Copy, it works and appears on the Clipboard, but a random Excel window flashes on screen, which didn't happen before. Not the biggest deal, just strange.
But if you Cut, the content goes away, a random Excel window flashes, and then you can't undo in Excel, so the content is just gone as it is not on the Clipboard History Switcher. And this is very destructive.
![Excel_KM_CopyCuyBug](https://forum.keyboardmaestro.com/uploads/default/original/3X/3/0/30dd2a29ec6186a85a94e342eb71e688ecdbed10.gif)
After some research, we discovered that if we exclude Excel from the Clipboard History Switcher in the KM Settings, this behavior no longer occurs!
Anyone else experience this behavior and no why this would have started happening all of the sudden? It doesn't make much sense to me and I can't figure out if the bug is in KM or Excel?
Any insight would be appreciated, thank you!
I had something similar happen a long time ago, and being able to exclude the app from KM's Clipboard History was the solution there too.
My guess is that Excel is doing something non-standard, and that's the source of the problem, but it's just a guess. In any case, I doubt another solution will come around.
(See, I'm using reverse logic here - whenever I say something like that, someone almost always comes around and proves me wrong. So maybe you'll get a solution now.
)
1 Like
Thank you @DanThomas! This is good to know, although unfortunate on Excel's part ![:joy: :joy:](https://forum.keyboardmaestro.com/images/emoji/apple/joy.png?v=12)
I just wonder what exactly is happening and why this just started happening last week. We've been using KM and Excel for a while and didn't see this behavior before, it's very odd!
Either way, thanks for the response, and holding out hope that your reverse logic works! ![:wink: :wink:](https://forum.keyboardmaestro.com/images/emoji/apple/wink.png?v=12)
That is definitely strange. Here's some questions you might ask yourself:
- Has either Excel or KM been upgraded just before the problem came up?
- Have you written or changed any KM macros that might mess with the clipboard somehow?
Other than that, "you're on your own". ![:stuck_out_tongue: :stuck_out_tongue:](https://forum.keyboardmaestro.com/images/emoji/apple/stuck_out_tongue.png?v=12)
Microsoft apps have a long history of placing flavors of data on the public clipboard that they don't actually want anyone to read, and that cause problems if they are read.
There is a feature in Keyboard Maestro to resolve this by excluding certain clipboard flavors from being read - Keyboard Maestro already does this for known problematic flavors, but sometimes Mcirosoft find new ways.
To find the flavor causing the problem, reenable clipboard history in Excel, and then in Keyboard Maestro’s status menu, hold the option and shift key down and select Start Debugging, that will enable a clipboard debugging mode.
A debugging window will appear.
Then copy something in the problem application.
All the flavors that were copied will be listed, with all the normal ones unchecked and all the non-standard ones checked. The checked ones are now ignored. So now try again, and Copy should work safely in the target application.
Turn off each non-standard checkbox in turn, check whether Copy works. If it causes problems, turn it back on, if it does not, leave it off.
Let me know the minimum flavors that need to be left checked to avoid the problem.
You should also report this to Microsoft, as their code should not cause problems when the public clipboard flavors are read.
6 Likes
Thank you @DanThomas and @peternlewis! What a great debugging feature! The new things I learn in KM are always mind-blowing!
Following your steps, I was able to find the culprit:
![image](https://forum.keyboardmaestro.com/uploads/default/original/3X/1/0/10529cb1bc69def7eba52bb4f7b6c5dd3a02fc0b.png)
Thanks again for the replies and helping me figure out this mystery. I will also report this to Microsoft.
2 Likes
"ShadowWorkbook". That's not suspicious sounding or anything... ![:joy: :joy:](https://forum.keyboardmaestro.com/images/emoji/apple/joy.png?v=12)
2 Likes
In the Terminal, now do:
defaults read com.stairways.keyboardmaestro.engine ExtraIgnoredClipboardFlavors
That should give an error presuming you have not configured it, which is good. If it gives an error, then do:
defaults write com.stairways.keyboardmaestro.engine ExtraIgnoredClipboardFlavors "com.microsoft.ShadowWorkbook"
Then restart the Keyboard Maestro Engine and it should ignore that flavor in the clipboard history.
2 Likes
Yep, that worked, amazing! Thanks @peternlewis!
@DanThomas, yeah, agreed
That name somewhat matches the behavior since what appeared to be a blank workbook would flash on screen ![:grimacing: :grimacing:](https://forum.keyboardmaestro.com/images/emoji/apple/grimacing.png?v=12)
Appreciate the help all!
3 Likes