topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday December 12, 2024, 8:47 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: CHS conflicts with TinySpell+ when pasting a clip into target app with KEYBOARD  (Read 6939 times)

leopoldus

  • Participant
  • Joined in 2010
  • *
  • Posts: 12
    • View Profile
    • Donate to Member
Hello,

There is a strange conflict or bug between your clipboard manager CHS (Clipboard Help+Spell) and TiniSpell+ (spelling utility, home page address http://tinyspell.numerit.com/#top ) at my Windows 7 x64 (English) system.

When the both CHS and TiniSpell+ are running, pasting a clip from Favorites clip or Recent clips list with a keyboard becomes a headache, because in many different target applications CHS pastes a letter "v" instead or adds this letter after the pasted clip(without a space) from a CHS list (I was not able to detect any clear algorithm between these two scenarios).

Say, in Windows 7 stock Notepad (also in other plain text editors AkelPad and Mark Editor) CHS pastes whether ONLY the single letter "v" or the required clip PLUS the letter "V".

MS Office Word 2013 x32:
a clip from Favorite clips list - OK
a clip from Recent clips list - pastes only letter "v"

Stickies (www.zhornsoftware.co.uk) - all is OK, no problems.

And so on, I've tried many different target apps, there no matter to list here every of them.

If I unload or disable TiniSpell+, the issue disappears. However when I tried to use TiniSpell+ with some other clipboard managers, say, Ditto, MyClip, Spartan MultiClipboard etc, there were no any troubles. Thus we need to conclude, that something is a bit wrong with CHS, say, it uses some very special hook to paste its clips in a target app.

NB!
The most interesting thing, that if I use a mouse to select a clip from the list (favorites or this recent clips etc), this problem does not appear. (However it is senseless for me, as I am a keyboard lover guy).

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
That's an interesting discovery, and the first time i've heard of it.
The fact that it happens with CHS but not some other clipboard tools, and that it doesn't occur if you paste with mouse suggests that it's something related to the way CHS simulates the press of Control+V in the target application..
Can you email me ([email protected]) so that I might send you some test versions to try?

Also, can you walk me through exactly how you are selecting and trying to paste clips using the keyboard?  Are you using Ctrl+Alt+Q hotkey to bring up the quick paste menu and then selecting with the enter key? Or with a specific # key? does it make a difference?

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,544
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
This might be relevant:
I have spent quite a bit of time tweaking around with AutoHotKey and CHS (Clipboard Help & Spell), trying to get it to meet my peculiar needs, and in the process - through some analysis and experimentation - I came to understand the sequence of steps in copy/paste actions - for example, as per this DCF discussion thread CHS tip - retain last clip's formatting with an AutoHotKey workaround script.

From experience, CHS is stable and reliable, and there are only two odd situations I come across with copy/paste actions from time to time:
  • 1. Broken Clipboard chain: If CHS "doesn't copy" something, then one needs to right-click the CHS Systray icon and select Re-establish Clipboard Chain, and that fixes it.
  • 2. Letter "v" is output on a Paste: Sometimes on a Ctrl-v (Paste) action, a letter "v" is pasted instead of the contents of the Clipboard buffer, and when you try to paste again you find that there is apparently nothing in the buffer or in position No.1 of CHS' list of recent clips, though sometimes the contents you wanted to Paste may be in position No.2. When this occurs, I can't reproduce it, but I suspect it may be that some exception (i.e., something unusual) has occurred - e.g., (say) a "Null" character has been copied into the Clipboard buffer - so my guess is that the printable character "v" of the key combo Ctrl-v somehow gets output instead.

That - the "v" output - actually looks a bit like what is happening per the OP (opening post).

tinySpell+ includes these features - per http://tinyspell.numerit.com/#features:
  •     Checks spelling of text that is copied to the clipboard
  •     Allows you to specify applications for which tinySpell is disabled or enabled
  •     Allows you to add words to the dictionary
  •     Optionally beeps on error (beep sound can be easily set to any wav file)
  •     Optionally displays a spelling tip (see example)
  •     Opens replacements list with a simple mouse click or a hot-key
  •     Optionally copies the selected replacement word to the clipboard
  •     Optionally inserts the selected replacement word into the document
  •     .....
  •     Supports Hunspell dictionaries in many languages (see Dictionaries below)
  •     Remembers the last error (even if it is not the last typed word)
  •     Optionally displays a spelling tip with instant correction (see example)
  •     Includes a clipboard spell checker that shows all spelling errors in the clipboard's text in a single glance, and allows you to correct them

When you make a Copy or a Paste, there is probably quite a lot - more or less simultaneously - going on in CHS and in tinySpell+, and both apps would be accessing/manipulating the contents of the Clipboard buffer and may be making changes to it at some stage.
If you read the example of the DCF discussion thread that I link to above, you will see that I started to have some real problems with CHS, which boiled down to timing issues (not conflicts) that I was able to address and fix in the AHK (AutoHotKey) script. Both CHS and AHK were accessing/manipulating the contents of the Clipboard buffer at the same time there as well.

At a guess, I would suggest that it could be that the same/similar issues are what is causing you problems with CHS and tinySpell+, since either on their own are presumably functioning just fine.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Following up on Iain's observations, one of the thing I could add to help narrow down the problem is an option user-defined delay between some of the paste actions that happen during a paste (simulating keypresses, etc.).  That might help identify the problem.

leopoldus

  • Participant
  • Joined in 2010
  • *
  • Posts: 12
    • View Profile
    • Donate to Member
Can you email me ([email protected]) so that I might send you some test versions to try?
Surely. I'll do it shortly.

Also, can you walk me through exactly how you are selecting and trying to paste clips using the keyboard?  Are you using Ctrl+Alt+Q hotkey to bring up the quick paste menu and then selecting with the enter key?
Or with a specific # key? does it make a difference?
Yes, I call the Quick paste menu list (only I've changed default hotkey to combination "Alt"+"<", but it does not matter, with the default hotkey the behavior is the same, I've just checked it.

It does not make any difference, whether I select the specific clip from the list with navigating arrows and than [Enter] or with a specific # key (or for favorites key Q + # keys)

The main difference is between using whether keyboard or mouse, as I've stated before.

NB!
Do you regard that strange fact, that in some target applications the issue appears and in some other does not? I have no any idea, what it might depend of.


I have spent quite a bit of time tweaking around with AutoHotKey and CHS (Clipboard Help & Spell), trying to get it to meet my peculiar needs, and in the process - through some analysis and experimentation

Ow, your short essay is quite impressive!  :Thmbsup:

However I need to add one essential thing (sorry, that I did nor made it from the beginning).

You are right, that tinySpell+ includes (among others) these features, which is connected to clipboard:
  •    Checks spelling of text that is copied to the clipboard
  •    Includes a clipboard spell checker that shows all spelling errors in the clipboard's text in a single glance, and allows you to correct them
  •    Optionally copies the selected replacement word to the clipboard

However I do not use them and have disabled them all. It was the first thing I've checked when the problem has appeared.

Thus you suggestion might be not true, that:
When you make a Copy or a Paste, there is probably quite a lot - more or less simultaneously - going on in CHS and in tinySpell+, and both apps would be accessing/manipulating the contents of the Clipboard buffer and may be making changes to it at some stage.

Also your observation is correct itself. It is clear in general, that the cause of CHS strange behavior is the Battle for the clipboard between CHS and TinySpell+. However the question is, what exactly happens and how it is possible to bypass it.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
However the question is, what exactly happens

Hopefully that is a question we will be able to partly answer as we experiment with fixes.
If I had to guess, my guess is that TinySpell is performing some action between the multiple steps that CHS performs as it tries to paste into the target application.
CHS has to switch the focus to the target app, wait for the target app to get focus, then send some keystrokes that involve pretending that the Control key is pressed.  It could be that Tiny Spell is intruding into this and interrupting one of the actions.
Based on your described behavior, it sounds like maybe its doing something to the keystate to cancel the keyboard ControlKey-Down state.

That's just a guess though.  Adding a small delay between steps might tell us a lot more, or might solve the problem completely.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Working with leopoldus over email we seem to have fixed the problem -- at least on initial testing.  Now we wait to see if it holds up...

IainB

  • Supporting Member
  • Joined in 2008
  • **
  • Posts: 7,544
  • @Slartibartfarst
    • View Profile
    • Read more about this member.
    • Donate to Member
@mouser: I'd be very interested in learning about whatever you discover there, please. You just might end up identifying the cause to the item 2. Letter "v" is output on a Paste that I mentioned above.
I had always supposed that the cause probably lay in the AHK script that I referred to, but I can't figure it out. Because CHS is so stable on its own, I didn't expect the cause to be CHS, and I only got the "v" thing after having introduced a modified AHK script for pasting formatted/unformatted clipboard contents.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
You just might end up identifying the cause to the item 2. Letter "v" is output on a Paste that I mentioned above.

i suspect so.  if you'd like to try the new beta, email me ([email protected]) and i'll send you a link.