Sleuthing Random Clipboard Pastes

I have a problem, my clipboard keeps pasting in the midst of my typing. It is very annoying and at times, a bit dangerous. If I have a password on my clipboard or other sensitive information and type a quick response on a public forum and I don’t read It very carefully, I may have easily just sent out sensitive data unawares.

I need to sleuth this problem first, because I really don’t know what is triggering It. The sound I get fro a macro is the same as for a text replacement. The two Apps I use heavily are Keyboard Maestro and TextExpander. Either one could be doing this.

I have not used Console very much. Would this be the best way to see what has just happens, the next time that It does? It just happened again typing the title of this post. Arrrgh!!

Suggestions are appreciated.

Thanks

Go to the Keyboard Maestro Editor Help menu.

Find the ‘Open Logs Folder’ item.

Select it.

Open the Engine.log file — it will open in Console.app.

Use the filter to search for clipboard and paste.

If you find the issue great.

If you don’t find the issue then leave the log open and use Menu > View > Clear Display to clear the log.

Entries will not be deleted – they will just be hidden.

Then go about your business until you trigger the event again.

Immediately switch to Console and see what was triggered.

If it was Keyboard Maestro then there should be an entry.

-Chris

Thanks. Console is in the wings.

I suppose the programs are working correctly. The goal is to find what is triggering a "paste" so that you can change the trigger or otherwise stop the behavior.

KM is easy to search. Select the "All Macros" Group from atop the Groups list in the leftmost column. Type "clipboard paste" in search field near the upper right corner of the KM window. Sort the matching macros by keyboard shortcut by clicking the "sort triangle" at the right-hand edge of the header for the Macros column (second from right, i.e.: the middle column). Manually :blush: scan the macros for a trigger you might be typing that caused KM to paste your clipboard.

I don't use TextExpander, but this unsophisticated approach should be easy to replicate.

I suggest starting your search with the ⇧s, ⇧r, ⇧c, and ⇧p.

Oops. I missed that you’re using TextExpander.

You can of course turn off either KM or TE and work for a while to see which one might be the culprit.

It is conceivable that both are interacting to cause the problem.

You can sort in the All Macros group of the Keyboard Maestro Editor by ‘Date Used’ to find out which was the last activate macro.

I suggest you change the sounds used to differentiate the two apps.

Do you have any abbreviation-expansions in TE that insert the clipboard?

The symbol for that in Typinator is {^}, and I can search for that in its UI – perhaps you can do something similar in TE.

-Chris

Changing the sounds is a great idea. Yes I went through the KM editor and turned off any triggers I was not using that had clipboard in them. Unfortunately, if one of those did It I still won’t have “discovered” the problem. Stopping It is helpful but It would be so much nicer to figure this out.

BTW, looking at the Console is a bit daunting. There are so many Items to click on the left, which one do I look at to see what may be happening? Diagnostic and Usage Messages? System Log Queries: All Messages? Huh?

A quick read-through of any of them should be enough to determine if it is causing the undesired behavior.

I did look, just looked again, didn’t find a culprit. This has been happening for a couple months now and I keep paying attention to what I am typing in case I am hitting a pattern. AAARRRGGGHHH!!! It just happened again!

Had music on so I missed the new sound, darn It.

Went to the Console and, I have no idea what I am looking at. Put “paste” and then “clipboard” in the upper right search box, no results.

Got this at about the same time as the last paste:
9/28/15 9:29:30.000 AM kernel[0]: Keyboard Maestro (map: 0xffffff801cc4c5a0) triggered DYLD shared region unnest for map: 0xffffff801cc4c5a0, region 0x7fff8f000000->0x7fff8f200000. While not abnormal for debuggers, this increases system memory footprint until the target exits.

9/28/15 9:32:24.853 AM Console[11466]: Failed to connect (_consoleX) outlet from (NSApplication) to (ConsoleX): missing setter or instance variable

9/28/15 9:32:26.000 AM kernel[0]: Console (map: 0xffffff801c794a50) triggered DYLD shared region unnest for map: 0xffffff801c794a50, region 0x7fff8f000000->0x7fff8f200000. While not abnormal for debuggers, this increases system memory footprint until the target exits.

That suggests that KM is not involved. What have you done and what did that tell you regarding TextExpander?

If that suggests that KM was not involved, It also suggests that TE was not involved, right?

I have not seen a pattern that stands out. It doesn’t seem to trigger on a certain portion of my keyboard - I could be wrong.

I wonder if this is a systemic problem like the old mechanical typewriters that used to get their keys tangled up when you typed too fast. That was why QWERTY was invented as a layout, to make typing inefficient. I wonder if there are triggers that are getting screwed up?

PS: I just realized that I still have a copy of Grammarian pro launching on my menubar. I loved that app but It really hasn’t worked correctly in a while and I am often making It force quite when I restart. Guess It’s time to face that program as non functioning and just get rid of It. Grammarian also has a auto-correct feature so I have three potentials, Grammarian Pro, TextExpander, and Keyboard Maestro.

Not in any way that I can think of.

We are working on the current assumption that some string of typed characters is triggering your OS to execute "paste". You identified two programs that might respond to a string of typed characters by pasting your clipboard at the current insertion point: KM and TE (and just added GP to the list). I asked you to filter your KM macros for likely candidates that might do this and examine each one to see if it was doing this. You reported that you disabled (some of) them. Your problem recurred. From which I deduced that none of the KM macros that you disabled were causing the mis-behavior. We did no trouble-shooting regarding TE at all.

Oh, I thought you had looked at the Console log I posted and had responded to that.

No — “That” with which I began my response referred to the part of your post that I quoted.

Chris will have to do the Consoling :blush: .

I think I will need to do some counseling and some consoling after I do the “Console”-ing. Makes my head hurt just to think about It. ;-/

OTO, got to get this problem fixed …

Hey levelbest,

You opened the KM engine.log?

~/Library/Logs/Keyboard Maestro/Engine.log

When looking at that everything else is immaterial.

Clear the log and leave Console running.

Open another window and select 'All Messages' on the left.

Clear the log.

Now go about your business.

Look at the logs immediately after your next incident.

Also – find out if TextExpander has a diagnostic log.

This is plainly not a system issue. It's very difficult to hit Cmd-V by accident – you can – but it's not easy – unless of course you've got it mapped to some other keystrokes somewhere.

Paste is not the only thing to look for in KM. Type keystroke Cmd-V is relevant as well.

Turn off Grammarian.

Don't just put up with this problem. Do the work of troubleshooting the problem.

If necessary turn OFF TextExpander and live without it for a while.

If necessary turn OFF Keyboard Maestro and live without it for a while.

Check the system keyboard prefs and get rid of any expansions that exist there.

Make SURE you don't have any other funky utilities running you don't know about.

Look in the Activity Monitor.

Use Spotlight to find applications installed during the period this problem started with the DATE-ADDED search item.

Are you using a US English system and keyboard layout?

What if anything is obviously different about your system from Stock?

Troubleshooting isn't magic. It's logical thinking and hard work.

-Chris

3 Likes

That is the system Console log, its not telling you much except that the system spews some complete rubbish into the system log.

You need to look at the Engine.log file, or click on the Recently triggered macros button the one that looks like a command (⌘) key at the top of the Keyboard Maestro editor window to see which macros have fired recently.

I think you have me mixed up with someone else? I send a screen shot of the Macro. I did not send any log data of any kind.

David

Click the link arrow on the quote and you can see the message it is referring too (from 16 days ago because I've been on holiday the last couple weeks).

I believe I know what could be happening: the way some text expansion apps work is by using the clipboard to paste whatever string you’re expanding and then restoring the clipboard a fraction of a second later. Search Textexpander options and see if there is an option to type instead of pasting expansions. You could do the same with KM. Instead of inserting text by pasting, insert text by typing. Hope this helps.