Double or No tapKey triggered randomly by ifPrimary/ifSecondary

But didn’t he just want Ctrl-A as secondary vs. a as primary? Why would he need a macro for that?

Yep.

If you can show how to get the secondary to work without a macro that’d be great

@kareltucek @UHQueefboard Sorry, my bad, I forgot that on the Agent interface you can only choose layer switcher or modifier for the secondary action, but not a keytap. I stand corrected; you do need a macro.

But you could shorten the macro:

$ifSecondary final tapKey LC-a
tapKey a

@kareltucek I assume if you have already selected the advancedStrategy as the default strategy in $onInit, then you don’t have to add advancedStrategy to the $ifSecondary, correct?

1 Like

Correct.

thanks @maexxx & @kareltucek for your input, I’ve removed the “advancedStrategy” from the ifSec and have just used the tapkey instead of the IfPrim etc.
Will let you know how it goes…

(I don’t expect any changes in behavior.)

(good, as you have avoided disappointment lol)

Any ideas on where I can go from here? The secondary action is still regularly firing on various keys when it definitely shouldn’t.

Thanks for head ups and sorry for the wait!

Give me a few more days please, I will prepare a firmware build with some more debug output to get to the bottom of things.

1 Like

No probs at all, appreciate the help!! TBH I was thinking “next suggestion is going be to blow away all the programming and start from scratch” so you building a custom firmware is waaay above & beyond the support usually provided <3 <3

I looove my UHK and the community

2 Likes

Here we go: https://github.com/UltimateHackingKeyboard/firmware/files/13941575/uhk-firmware-10.6.0-key_timing_hunt_v1.tar.gz

The firmware records timing all the time, including UHK output and secondary role activations (and reason of the activation). Furthermore, whenever status buffer is full, it will roll it by one half, therefore always outputting last ~20 events that took place.

So please gather some logs…

1 Like

Got one pretty quickly when typing an email:

*** Here's where I typed "Poly/HP" and hit the error on the "P" in "HP" - there are probably a few things at the bottom where I left clicked to open text editor and hit the FN key to print buffer to file***
OUT LS p
OUT LS 
OUT 
DOWN 10 1008155 1008155
OUT o
UP 10 1008281 1008281
OUT 
DOWN 10 1008434 1008434
OUT l
UP 10 1008505 1008505
OUT 
DOWN 10 1008577 1008577
OUT y
UP 10 1008650 1008650
OUT 
DOWN 26 1008843 1008843
OUT ?
UP 26 1008915 1008915
OUT 
DOWN 85 1009036 1009035
OUT  85 1009137 1009137
OUT LS h
UP 85 1009210 1009210
OUT LS 
DOWN 10 1009302 1009302
OUT LCLS 
OUT LCLS p
OUT LCLS 
OUT LS 
UP 10 1009400 1009400
DOWN 3 1009531 1009531
OUT LS ?
UP 3 1009601 1009601
OUT LS 
UP 85 1010134 1010134
OUT 
DOWN 29 1011497 1011497
DOWN 72 1011897 1011897
OUT ?
UP 72 1011973 1011973
OUT 
UP 29 1013256 1013256
DOWN 13 1016742 1016742
UP 13 1016858 1016858
DOWN 31 1019244 1019244
DOWN 1 1020164 1020164

I wondered if holding down LS and typing multiple letters would cause the problem - it didn’t trigger the secondary on H or P, but I did manage to trigger the “New Search Folder” dialog to popup in Outlook, haven’t researched what key does this yet:

image

*** In an email (using Outlook Windows App), held LS down and typed "HP" repeatedly, sometimes pressing H or P multiple times, eventually triggered the Outlook "New Search Folder" dialog to pop up, unsure of what key does that at this point. ***
OUT LS p
OUT LS 
DOWN 10 1814489 1814489
OUT LS h
UP 10 1814552 1814552
OUT LS 
DOWN 10 1814686 1814686
OUT LS h
UP 10 1814761 1814761
OUT LS 
DOWN 10 1814856 1814856
DOWN 10 1814868 1814856
UP 10 1814907 1814856
Primary D: 10
OUT LS p
OUT LS 
OUT LS h
UP 10 1814919 1814918
OUT LS 
DOWN 10 1815111 1815111
UP 10 1815203 1815111
OUT LS p
OUT LS 
DOWN 10 1815310 1815310
Primary A: 10
OUT LS p
OUT LS 
UP 10 1815404 1815404
DOWN 10 1815508 1815508
Primary A: 10
OUT LS p
OUT LS 
UP 10 1815591 1815591
DOWN 10 181
OUT LS h
UP 10 1815800 1815800
OUT LS 
DOWN 10 1815871 1815871
OUT LCLS 
OUT LCLS p
OUT LCLS 
OUT LS 
UP 10 1815967 1815965
DOWN 10 1816044 1816044
OUT LS h
UP 10 1816124 1816124
OUT LS 
DOWN 10 1816171 1816171
UP 10 1816285 1816171
OUT LS p
OUT LS 
UP 85 1817828 1817828
OUT 
DOWN 13 1824908 1824908
UP 13 1827443 1827443
DOWN 13 1838413 1838413
UP 13 1838507 1838507
DOWN 31 1841547 1841547
DOWN 1 1842211 1842210
** Was holding down LS, pressed "s" and got the below, have verified I get same results by just tapping "s" with no LS held - did it in UHK Agent watching buffer**
DOWN 80 4016789 4016789
OUT LC 
OUT LC s
OUT LC 
OUT 
UP 80 4016885 4016883

EDIT: was pressing “2”, secondary kept firing so I needed to click (key 13) back into the cell and try to type “2” again:

DOWN 13 8432365 8432365
UP 13 8432496 8432496
DOWN 66 8433221 8433221
UP 66 8433298 8433221
Primary A: 66
OUT ?
OUT 
DOWN 13 8440145 8440145
UP 13 8440250 8440250

May it be connected to this issue? Ihttps://github.com/UltimateHackingKeyboard/firmware/issues/207#issuecomment-1496679608

Certainly looks like OP raised the same issue near the end of the thread - https://github.com/UltimateHackingKeyboard/firmware/issues/207#issuecomment-877708268 but didn’t really go anywhere.

I’m not getting the issue you raised back in April though (fortunately haha).

Woot, have Github issue opened for this https://github.com/UltimateHackingKeyboard/firmware/issues/746

@UHQueefboard I am sorry for this inconvenience… I have tried to interpret those logs, and realized that… I can’t for multiple reasons.

Here is a new firmware, with new logging in place: uhk-firmware-10.6.0-key_timing_hunt_v2.tar.gz I have also written a script to visualize the output as a graph (which was not possible with the previous logging), so this time I should be more sucessful :sweat_smile:.

Would you be so kind as to capture some of those failing scenarios again?

1 Like

No problems at all!! Appreciate the work you’re putting into this one. I’ve flashed the new firmware and will post logs here when the issue occurs.

EDIT:

**Mod (rightSpace) held then pressed "k" (down arrow) & released Mod, then pressed "4" - secondary triggered**
 DOWN rightSpace 5620194 5620194
 DOWN k 5620288 5620288
 5620289 OUT ?
 UP k 5620429 5620429
 5620429 OUT 
 UP rightSpace 5620435 5620435
 DOWN 4 5621406 5621406
 5621413 OUT LA 
 5621414 OUT LA ?
 5621415 OUT LA 
 5621416 OUT 
 UP 4 5621473 5621473

EDIT2:

** A few left clicks, followed by attempting to type "SC" holding LS while pressing S and C keys, triggered secondaries on both S and C**
DOWN leftModule.leftButton 7995702 7995702
UP leftModule.leftButton 7995827 7995827
DOWN leftModule.leftButton 7997060 7997060
UP leftModule.leftButton 7997170 7997170
DOWN leftModule.leftButton 7997756 7997756
UP leftModule.leftButton 7997858 7997858
DOWN leftShift 7997995 7997995
7997996 OUT LS 
DOWN s 7998104 7998104
7998142 OUT LCLS 
7998143 OUT LCLS s
7998144 OUT LCLS 
7998145 OUT LS 
DOWN c 7998297 7998297
7998300 OUT LCLS 
7998301 OUT LCLS c
7998302 OUT LCLS 
7998303 OUT LS 
UP s 7998351 7998351
UP 
UP leftShift 7998913 7998913
7998913 OUT 
DOWN leftModule.leftButton 8002902 8002902
UP leftModule.leftButton 8003006 8003006
DOWN leftModule.leftButton 8004817 8004817
UP leftModule.leftButton 8004939 8004939

EDIT 3 (lmk if separate posts are preferred):

**Typing "drop", secondary triggered on "p" keypress**
DOWN d 1145709 1145709
1145709 OUT d
UP d 1145797 1145797
1145797 OUT 
DOWN r 1145841 1145841
1145841 OUT r
DOWN o 1145923 1145923
1145923 OUT or
UP r 1145937 1145937
1145937 OUT o
DOWN p 1146007 1146007
1146117 OUT LC o
1146118 OUT LC op
1146119 OUT LC o
1146120 OUT o
UP o 1146021 1146121
1146121 OUT 
UP p 1146128 1146128
1 Like

Was typing “appt with” into a website (much like this one lol) and the bloody secondary kept firing on the “w” keypress which closed the page :smiley:

** Typed "t with" (leftMod is space), secondary triggered on "w" but I kept typing a few more letters before the webpage closing registered with my brain lol**
18907663 OUT 
DOWN t 18907710 18907710
18907710 OUT t
UP t 18907810 18907810
DOWN leftMod 18907810 18907810
18907810 OUT ?
UP leftMod 18907905 18907905
18907905 OUT 
DOWN w 18907956 18907956
18907956 OUT LC 
18907958 OUT LC w
18907960 OUT LC 
18907962 OUT 
UP w 18908038 18908038
DOWN i 18908044 18908044
18908044 OUT i
UP i 18908122 18908122
18908122 OUT 
DOWN t 18908190 18908190
18908190 OUT t
UP t 18908285 18908285
18908285 OUT 
DOWN h 18908310 18908310
18908310 OUT h
UP h 18908368 18908368
18908368 OUT