StrokesPlus.net
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Mohsin  
#1 Posted : Monday, September 23, 2019 4:09:48 PM(UTC)
Mohsin

Rank: Newbie

Reputation:

Groups: Approved
Joined: 9/15/2019(UTC)
Posts: 9
Pakistan

Hi,
I am a long time user of strokesplus. Switched to this new version strokesplus.net couple of weeks back and since few days started using text expansion feature. However, this feature is inconsistent for me. It stops working randomly and when I exit the program from task tray and reopen it from start menu, text expansion starts to work again. I cannot find any relation with any program, just stops randomly. I am using the latest version 0.3.4.3. also tried uninstalling and reinstalling it but the problem persists.
Rob  
#2 Posted : Tuesday, September 24, 2019 7:16:12 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
Myself, I don't actually use the text expansions very often, so I might not have come across an issue. I will try to use them more frequently to see if I can find a pattern, I will also review the code.

But if you would, install the tracing version of S+ here: https://www.strokesplus.net/download/latest/installertrace

When it starts (or right-click from tray icon and select Set Trace Options) clear all (Select None) and only check TextExpansionEvents. Run the trace version until the issue starts happening, then send me the trace log file so I can see what S+ is thinking at that time.

See this post for additional details: https://forum.strokesplus.net/posts/t3012-Tracing-Logging-Builds-for-Troubleshooting

Once the issue starts happening, repeat the text expansion keystrokes a few more times, then exit S+ so the end of the log file contains the area of issue I need to review.

IMPORTANT: This particular trace option will result in logging every keystroke, so you may want to open the trace file and send only the bottom most section, just make sure it captures enough information. If you send the entire file, I would be able to see all keystrokes while you were using the computer (from since S+ trace was started), that might include usernames/passwords and I don't want the responsibility of having that info!
Mohsin  
#3 Posted : Tuesday, September 24, 2019 9:18:47 AM(UTC)
Mohsin

Rank: Newbie

Reputation:

Groups: Approved
Joined: 9/15/2019(UTC)
Posts: 9
Pakistan

Ok. I will do the procedure you mentioned and will respond in couple of days.
Thanks for making such nice program and prompt support.
Mohsin  
#4 Posted : Tuesday, September 24, 2019 11:00:16 PM(UTC)
Mohsin

Rank: Newbie

Reputation:

Groups: Approved
Joined: 9/15/2019(UTC)
Posts: 9
Pakistan

Rob, I have sent you the log file via PM.

Also I am facing another problem that my gestures of copy pasting or any other command are not working for input or copying text from edge. This problem is permanent for edge and it does not happen for chrome or internet explorer or any other program. Let me know if you need trace log for that too.
Rob  
#5 Posted : Wednesday, September 25, 2019 8:00:07 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
I'm not sure if you looked at the log, but there's clearly something that happens where keystrokes are getting captured multiple times, so of course they don't match any text expansion token.

For example it's working here; each key is adding to the token until there's a match:
Code:
25/09/2019 7:20:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: m
25/09/2019 7:20:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: my
25/09/2019 7:20:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: mye
25/09/2019 7:20:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: myem
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: myema
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: myemai
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: myemail
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Possible trigger, test token here, token: myemail
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Trigger match, token: myemail
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Setting application
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Global match: my email
25/09/2019 7:20:28 AM: [1] HookState.cs::TextExpansionComplete(): Enter function:
25/09/2019 7:20:28 AM: [12] HookState.cs::FireTextExpansionThread(): Entering function
25/09/2019 7:20:28 AM: [12] HookState.cs::FireTextExpansionThread(): Sending backspaces
25/09/2019 7:20:28 AM: [12] HookState.cs::FireTextExpansionThread(): Name: my email - TextExpansionType: Text


After that, the keystrokes are not being captured individually, it's registering multiple keystrokes for each character after that match above:

Code:
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: a
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aa
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aad
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aadd
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddm
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmm
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmi
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmii
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmiis
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmiiss
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmiisss
25/09/2019 7:53:25 AM: [1] HookState.cs::KeyboardProc(): current token length > limit, reseting
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: i
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ii
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iio
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioo
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioon
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn
25/09/2019 7:53:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn.
25/09/2019 7:53:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn..
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn..t
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn..tt
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn..ttu
25/09/2019 7:53:28 AM: [1] HookState.cs::KeyboardProc(): current token length > limit, reseting
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: f
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff.
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..e
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..ee
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eed
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eedd
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eeddu
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eedduu
25/09/2019 7:53:30 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eedduu.
25/09/2019 7:53:30 AM: [1] HookState.cs::KeyboardProc(): current token length > limit, reseting
25/09/2019 7:53:30 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: p
25/09/2019 7:53:30 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: pp
25/09/2019 7:53:31 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ppk
25/09/2019 7:53:31 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ppkk


What program was this in? You were clearly sending an email. It looks like you typed "myemail" to insert your email address, then started typing a destination email address which was getting two characters for every single one typed. I'm assuming when this happens, you're not seeing double keystrokes/letters showing on the screen, correct?
Rob  
#6 Posted : Wednesday, September 25, 2019 8:03:42 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
You might also select KeyboardHookGeneralEvents in the Trace Options, since that will include some other debug lines which may be helpful.

I'm wondering if the call to attach to the window thread is failing to detach, resulting in multiple messages for each single keystroke..?
Mohsin  
#7 Posted : Wednesday, September 25, 2019 8:09:30 AM(UTC)
Mohsin

Rank: Newbie

Reputation:

Groups: Approved
Joined: 9/15/2019(UTC)
Posts: 9
Pakistan

This was in notepad.
I checked it in Chrome address bar too and also in email Client TheBat! Same results, text expansion was not working in any program once it stops working. I will try to attach another log with the option you asked for.


Originally Posted by: Rob Go to Quoted Post
I'm not sure if you looked at the log, but there's clearly something that happens where keystrokes are getting captured multiple times, so of course they don't match any text expansion token.

For example it's working here; each key is adding to the token until there's a match:
Code:
25/09/2019 7:20:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: m
25/09/2019 7:20:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: my
25/09/2019 7:20:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: mye
25/09/2019 7:20:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: myem
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: myema
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: myemai
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: myemail
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Possible trigger, test token here, token: myemail
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Trigger match, token: myemail
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Setting application
25/09/2019 7:20:28 AM: KeyboardHook.cs::KeyboardProc(): Global match: my email
25/09/2019 7:20:28 AM: [1] HookState.cs::TextExpansionComplete(): Enter function:
25/09/2019 7:20:28 AM: [12] HookState.cs::FireTextExpansionThread(): Entering function
25/09/2019 7:20:28 AM: [12] HookState.cs::FireTextExpansionThread(): Sending backspaces
25/09/2019 7:20:28 AM: [12] HookState.cs::FireTextExpansionThread(): Name: my email - TextExpansionType: Text


After that, the keystrokes are not being captured individually, it's registering multiple keystrokes for each character after that match above:

Code:
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: a
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aa
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aad
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aadd
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddm
25/09/2019 7:53:24 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmm
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmi
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmii
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmiis
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmiiss
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: aaddmmiisss
25/09/2019 7:53:25 AM: [1] HookState.cs::KeyboardProc(): current token length > limit, reseting
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: i
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ii
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iio
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioo
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioon
25/09/2019 7:53:25 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn
25/09/2019 7:53:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn.
25/09/2019 7:53:27 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn..
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn..t
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn..tt
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: iioonn..ttu
25/09/2019 7:53:28 AM: [1] HookState.cs::KeyboardProc(): current token length > limit, reseting
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: f
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff.
25/09/2019 7:53:28 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..e
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..ee
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eed
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eedd
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eeddu
25/09/2019 7:53:29 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eedduu
25/09/2019 7:53:30 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ff..eedduu.
25/09/2019 7:53:30 AM: [1] HookState.cs::KeyboardProc(): current token length > limit, reseting
25/09/2019 7:53:30 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: p
25/09/2019 7:53:30 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: pp
25/09/2019 7:53:31 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ppk
25/09/2019 7:53:31 AM: KeyboardHook.cs::KeyboardProc(): Character added to token: ppkk


What program was this in? You were clearly sending an email. It looks like you typed "myemail" to insert your email address, then started typing a destination email address which was getting two characters for every single one typed. I'm assuming when this happens, you're not seeing double keystrokes/letters showing on the screen, correct?


Rob  
#8 Posted : Wednesday, September 25, 2019 8:27:51 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
Ignore my summary of events, I wasn't looking at the timestamps. 30 minutes had passed between the first match of "myemail" and the next section of "admissions.tuf.edu.pk" where it was duplicating keystrokes.

Did you happen to remove any entries between those two time periods? If so, is there anything during that time which might be helpful?
Mohsin  
#9 Posted : Wednesday, September 25, 2019 8:36:08 AM(UTC)
Mohsin

Rank: Newbie

Reputation:

Groups: Approved
Joined: 9/15/2019(UTC)
Posts: 9
Pakistan

no I did not remove anything from the log file.
I could not think of any thing unusual happening during this time period. Write now i am Tracing with the options you mentioned and will post the log once text expansion stops working.
Rob  
#10 Posted : Wednesday, September 25, 2019 8:42:05 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
Actually, install this:

https://www.strokesplus.net/files/StrokesPlus.net_Setup_0.3.4.4.exe

Then the corresponding trace version:

https://www.strokesplus.net/files/StrokesPlus.net_Setup_0.3.4.4_Trace.exe

And run that trace version with the options I mentioned.

I'm wondering if there's something calling PeekMessage then GetMessage and that's why the hook is getting two events triggered. If so, I might need to also examine the value passed into the hook for text expansion and only add to the token for GetMessage calls (or PeekMessage with remove parameter).

This trace version will capture the value passed in so if we see two events with different nCode values for the same keystroke, we'll know it's because of that.
Mohsin  
#11 Posted : Wednesday, September 25, 2019 8:45:59 AM(UTC)
Mohsin

Rank: Newbie

Reputation:

Groups: Approved
Joined: 9/15/2019(UTC)
Posts: 9
Pakistan

ok. Installing the version you mentioned and will again start tracing.
Also any clues regarding gestures not working in edge?

Edited by user Wednesday, September 25, 2019 8:47:09 AM(UTC)  | Reason: Not specified

Rob  
#12 Posted : Wednesday, September 25, 2019 9:15:01 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
Yeah, Edge is stupid....

In S+ Options, uncheck Always Activate Window Where Gesture Began.

Edge uses some really weird window hierarchy, still trying to see if I can figure out a way to add an exception in handling Edge specifically.
Mohsin  
#13 Posted : Wednesday, September 25, 2019 9:45:58 AM(UTC)
Mohsin

Rank: Newbie

Reputation:

Groups: Approved
Joined: 9/15/2019(UTC)
Posts: 9
Pakistan

Hi Rob,
Now I can confirm to reproduce the problem. In my Power options, I have set the setting Turn off the display : 3 minutes

Text Expansion works fine when I am working on laptop. But if i leave it for 3 minutes and the display goes off and then I login again, at that time text expansion stops working. It starts working again if I exit the program and then restart it.

Edited by user Wednesday, September 25, 2019 9:46:49 AM(UTC)  | Reason: Not specified

Rob  
#14 Posted : Tuesday, October 1, 2019 8:59:19 AM(UTC)
Rob

Rank: Administration

Reputation:

Groups: Translators, Members, Administrators
Joined: 1/11/2018(UTC)
Posts: 401
United States

Thanks: 5 times
Was thanked: 78 time(s) in 68 post(s)
Follow up:

So what I've found is that when you activate Edge's top level window (ApplicationFrameWindow), it changes the focus (or something..) to the main body/browser area window of Edge (Windows.UI.Core.CoreWindow).
It's during this switch when keyboard input is sent to the top level window (and is basically lost), once CoreWindow is active, the input is received fine.

Adding sp.Sleep(100); before sending keystrokes gives Edge enough time for the CoreWindow to become activated and accept input.

Also, this is the result of changes made in 0.3.3.5 in correcting window activation with sub-windows. For example, when a Find/Replace popup window was open, trying to send an action which sends Ctrl+V would activate the top-level window and the Find/Replace window lost focus. In 0.3.3.5 I added code which walks up the window hierarchy looking for the first moveable parent window (has SYSMENU style) and activates that. This seems to have resolved those issues, but introduced the issue for Edge due its architecture.

Note that Calculator is also a Core app with similar window hierarchy, but it does not suffer from this timing problem. So it's something internal to Edge which is discarding/ignoring the input until the CoreWindow is active/ready to receive input. Thus, I'm not keen to alter the S+ code at this point as it may be something they correct and I don't want to hard code one specific application workaround. Especially considering you can add a small delay for impacted actions which really are not noticeable in human terms. Also, having to check the process name is expensive and really the only solid way to ensure we're dealing with Edge. Adding this check would slow down every action a small amount.

Edited by user Tuesday, October 1, 2019 8:59:51 AM(UTC)  | Reason: Not specified

Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.