Author Topic: Looking for keyboard recommendation for 3-key combos with AutoHotKey  (Read 5328 times)

0 Members and 1 Guest are viewing this topic.

Offline downstairs

  • Thread Starter
  • Posts: 12
tl;dr:

I'm looking for a keyboard which will allow AutoHotKey to detect all manners of 3-key combos without randomly having keys "stick."


Verbose:

Hello, I'm new here as you can see. I'm very into using AutoHotKey to automate... well, everything. And because of that I need many different three-key combos to trigger my various automations.

I've heard I should look for n-key rollover?

I currently use the CapsLock (which I disable from it's intended use) as a trigger key... and then many 2-key combos with CapsLock detected as down/pressed.

I often find the CapsLock (and other keys) get "stuck"... and I can't even write a hack script to un-stick them.

So I assume I need a keyboard that can handle and detect multiple key presses at once. I'm open to spending some OK money (I know you guys don't want price discussed here).

I currently have a:
Dell Smartcard Keyboard (KB813-BK-US) Smartcard Reader, Wired USB, Black, US Key Layout

It's worked great for three-key presses up until recently, but it's not a superstar keyboard by any means.

Any ideas on where I should look? Or... any flat-out recommendations?

Note: I don't game. I just like to automate things. I also need a numberpad... heck, the more keys the better.

Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #1 on: Thu, 29 October 2020, 11:30:16 »
a 2key rollover board should either just ignore or add "ghost" keys to what you type if you have stuck codes is that something has crashed, if you had an adapter i would point you to that as i had some crash on 2 keys combos, so either windows update has introduced a bug in the usb keyboard drivers (strange) or your keyboard may be old and dying, electronics can fail in unexpected ways, to me any keyboard with 5kro or nkro should work 2kro could also but you may get some unexpected 4th keys
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #2 on: Fri, 30 October 2020, 09:47:18 »
a 2key rollover board should either just ignore or add "ghost" keys to what you type if you have stuck codes is that something has crashed, if you had an adapter i would point you to that as i had some crash on 2 keys combos, so either windows update has introduced a bug in the usb keyboard drivers (strange) or your keyboard may be old and dying, electronics can fail in unexpected ways, to me any keyboard with 5kro or nkro should work 2kro could also but you may get some unexpected 4th keys

So curious... should I be looking for n-key rollover?  Anti-ghosting?  Anything else to ensure 3-key combos don't "stick" keys?

In terms of the keyboard failing... the issue is I just bought a new one of the same make/model when this started happening.

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #3 on: Fri, 30 October 2020, 10:26:04 »
Any modern mechanical keyboard will handle 3 random keys with no problem, most will be 6 key rollover as this works everywhere while n-key (unlimited) doesn't work in many BIOSes amongst other things as it's not standard USB HID spec.

Not sure what you have AutoHotKey setup to do but what we keyboard nuts mostly do is have a programmable board so we can take our shortcuts anywhere.  Probably not something you need with a fullsize board...

As for where to buy, where in the world are you?  Do you want ANSI (wide enter) or ISO (tall weird shape enter) or maybe a JIS board with it's tiny spacebar an extra keys in the bottim row would be appealing?
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #4 on: Fri, 30 October 2020, 11:07:17 »
Any modern mechanical keyboard will handle 3 random keys with no problem, most will be 6 key rollover as this works everywhere while n-key (unlimited) doesn't work in many BIOSes amongst other things as it's not standard USB HID spec.

Not sure what you have AutoHotKey setup to do but what we keyboard nuts mostly do is have a programmable board so we can take our shortcuts anywhere.  Probably not something you need with a fullsize board...

As for where to buy, where in the world are you?  Do you want ANSI (wide enter) or ISO (tall weird shape enter) or maybe a JIS board with it's tiny spacebar an extra keys in the bottim row would be appealing?

I have AutoHotHey set up to trap CapsLock, use that as a "trigger" (not sure on the specific terminology) key... and then AHK handles three-key combos like "CapsLock-S-U" for one string of text "CapsLock-S-Y" for another similar string... and then a million more things.

I'd prefer the wide enter, not the L shape... because that is what I'm used to.

I'm in the USA (Louisiana).

I'm interested in anything that will work... but I'm now used to my CapsLock based workflow.  My issue is not just with AHK being able to capture three-key combos... but for that not to cause "sticking"

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #5 on: Fri, 30 October 2020, 11:28:23 »
I've never used AHK but unless the problem is because Caps Lock is special (a quick search suggests this isn't a problem and it's a commonly used key) you really don't have any special requirements.

You can't go wrong with mk.com - lots of full size boards from crazy colours to office friendly in stock in the USA so no crazy covid shipping times.  Ducky, Filco and Varmillo are all good, what switch you want is a whole other thread...


Afterthought - is your problem caused by accidentally activating sticky keys in Windows?  It used to be disable-able in accessibility settings but who knows where it's hidden in the new 'helpful' versions.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #6 on: Fri, 30 October 2020, 14:06:11 »
I've never used AHK but unless the problem is because Caps Lock is special (a quick search suggests this isn't a problem and it's a commonly used key) you really don't have any special requirements.

You can't go wrong with mk.com - lots of full size boards from crazy colours to office friendly in stock in the USA so no crazy covid shipping times.  Ducky, Filco and Varmillo are all good, what switch you want is a whole other thread...


Afterthought - is your problem caused by accidentally activating sticky keys in Windows?  It used to be disable-able in accessibility settings but who knows where it's hidden in the new 'helpful' versions.

I checked "sticky" keys in Windows, it is off.  Thing is... my keys sticking are not constant, I can't recreate the issue easily, but it happens enough that it is annoying (flooding a chat with a string of what people think is nonsense text!)

So I'm thinking it is hardware.

Also... I've tried everything (even completely bonkers hacks) in AHK to stop it.

Foolishly I bought the same keyboard I've been using three times to see if it would go back to being perfect.


Anyway... I assume I want a keyboard with n-key rollover and anti-ghosting?

I've never used a mechanical keyboard, but with my obsession with automation, I'm kinda on board with spending some OK money on a keyboard.  I'm using it like 16/24 hours a day.

I'd love to know it'll work well with my three-key combos

EDIT: All the mechanical keyboards I'm seeing have N-key rollover, but anti-ghosting is not common.  Is that important?  I don't think I've had issues with ghosting, but I'm new to all of this
« Last Edit: Fri, 30 October 2020, 14:10:43 by downstairs »

Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #7 on: Fri, 30 October 2020, 14:48:13 »
n-key (unlimited) (...) as it's not standard USB HID spec.
it actually is but not the default initialization settings, it need to be then negotiated by the OS what windows is incapable of doing
I've never used AHK but unless the problem is because Caps Lock is special (a quick search suggests this isn't a problem and it's a commonly used key) you really don't have any special requirements.
i do trigger whole macros that extracts data from api-less application at work using capslock and AHK, it is rather powerful
I checked "sticky" keys in Windows, it is off.  Thing is... my keys sticking are not constant, I can't recreate the issue easily, but it happens enough that it is annoying (flooding a chat with a string of what people think is nonsense text!)

So I'm thinking it is hardware.
although to be honest it could also be your AHK script, if you send a down key without its up counterpart later the key will stay "stuck" if you have a 2nd keyboard try with that
Also... I've tried everything (even completely bonkers hacks) in AHK to stop it.

Foolishly I bought the same keyboard I've been using three times to see if it would go back to being perfect.


Anyway... I assume I want a keyboard with n-key rollover and anti-ghosting?
not really, both are mutually exclusive, you can't have ghosting on an n-key rollover(NKRO) keyboard as ghosting only happen when you press more key than what the keyboard is built to handle, which for the case of an nkro is in theory infinite, anti-ghosting will just prevent 2kro keyboards from sending garbage when more then 2 keys are held
I've never used a mechanical keyboard, but with my obsession with automation, I'm kinda on board with spending some OK money on a keyboard.  I'm using it like 16/24 hours a day.

I'd love to know it'll work well with my three-key combos

EDIT: All the mechanical keyboards I'm seeing have N-key rollover, but anti-ghosting is not common.  Is that important?  I don't think I've had issues with ghosting, but I'm new to all of this
as i stated "anti-ghosting" is not what you are after, it is mostly a marketing thing to sell to gamer because ghosting is a problem to them on some games when using typist optimized 2kro keyboards (like the model M). 6KRO or NKRO are the best for your special use case but i have doubts it will actually solve your problem, if you changed keyboards recently it could be one of your combo crashing the keyboard controller (unlikely but could happen) or maybe one of your script wreaking havoc with key downs with no ups, or actually could even be a bad contact on the usb port. if you could find a cheap or even used keyboard to test if it really is the keyboard, or try your shortcut with AHK disabled it could remove some unknown and may prevent some unneeded spending.
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #8 on: Fri, 30 October 2020, 15:13:33 »
n-key (unlimited) (...) as it's not standard USB HID spec.
it actually is but not the default initialization settings, it need to be then negotiated by the OS what windows is incapable of doing
I've never used AHK but unless the problem is because Caps Lock is special (a quick search suggests this isn't a problem and it's a commonly used key) you really don't have any special requirements.
i do trigger whole macros that extracts data from api-less application at work using capslock and AHK, it is rather powerful
I checked "sticky" keys in Windows, it is off.  Thing is... my keys sticking are not constant, I can't recreate the issue easily, but it happens enough that it is annoying (flooding a chat with a string of what people think is nonsense text!)

So I'm thinking it is hardware.
although to be honest it could also be your AHK script, if you send a down key without its up counterpart later the key will stay "stuck" if you have a 2nd keyboard try with that
Also... I've tried everything (even completely bonkers hacks) in AHK to stop it.

Foolishly I bought the same keyboard I've been using three times to see if it would go back to being perfect.


Anyway... I assume I want a keyboard with n-key rollover and anti-ghosting?
not really, both are mutually exclusive, you can't have ghosting on an n-key rollover(NKRO) keyboard as ghosting only happen when you press more key than what the keyboard is built to handle, which for the case of an nkro is in theory infinite, anti-ghosting will just prevent 2kro keyboards from sending garbage when more then 2 keys are held
I've never used a mechanical keyboard, but with my obsession with automation, I'm kinda on board with spending some OK money on a keyboard.  I'm using it like 16/24 hours a day.

I'd love to know it'll work well with my three-key combos

EDIT: All the mechanical keyboards I'm seeing have N-key rollover, but anti-ghosting is not common.  Is that important?  I don't think I've had issues with ghosting, but I'm new to all of this
as i stated "anti-ghosting" is not what you are after, it is mostly a marketing thing to sell to gamer because ghosting is a problem to them on some games when using typist optimized 2kro keyboards (like the model M). 6KRO or NKRO are the best for your special use case but i have doubts it will actually solve your problem, if you changed keyboards recently it could be one of your combo crashing the keyboard controller (unlikely but could happen) or maybe one of your script wreaking havoc with key downs with no ups, or actually could even be a bad contact on the usb port. if you could find a cheap or even used keyboard to test if it really is the keyboard, or try your shortcut with AHK disabled it could remove some unknown and may prevent some unneeded spending.

Can you maybe explain what you think the issue may be with AHK up/down triggers.  Here is a general sample of what I'm doing... this is not the whole script, that is massive:

Code: [Select]
#NoEnv
SetCapsLockState, AlwaysOff

#If GetKeyState("Capslock", "P")

4::SendInput, TEXTHERE
5::SendInput, TEXTHERE

H & 1::Run D:\chris\system\autohotkey_scripts\_ahk_to_do\_hot keys to do.txt

E & U::SendInput, my@email.com
E & Q::SendInput, my@other email.com



Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #9 on: Sat, 31 October 2020, 02:22:10 »
ok you do not use it :) you can with AHK send things like [a down] that will hold a down until you send [a up] and i sometimes forgot to send the 2nd one in my scripts but that is not the problem you have here (most often i forget the [ctrl up] and then try to type...)
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #10 on: Sat, 31 October 2020, 03:47:56 »
You bought more than one of the same board and nothing changed?  It looks to be a quality rubber dome and being spillproof it shouldn't be an issue in the board so I'm with yui - it's not the keyboard, save your money.

What's in 'hot keys to do.txt', and can you tlease post an example of the nonsense text output with the part of the AHK script that triggered it (hoping to see some kind of relationship...)
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #11 on: Sat, 31 October 2020, 08:01:11 »
You bought more than one of the same board and nothing changed?  It looks to be a quality rubber dome and being spillproof it shouldn't be an issue in the board so I'm with yui - it's not the keyboard, save your money.

What's in 'hot keys to do.txt', and can you tlease post an example of the nonsense text output with the part of the AHK script that triggered it (hoping to see some kind of relationship...)

Oh I shouldn't have said "nonsense text" that was incorrect.  My AutoHotKey output is perfect, no strange keys/text.

What I meant by nonsense text was... when I'm in a chat, and my capslock is stuck in AHK... I'll send my full email signature or whatever to the whole group... which to them is "nonsense"

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #12 on: Sun, 01 November 2020, 03:21:34 »
So you log in to chat (I guess this is e-mail and password both input by AHK - is the tab automated too?) and the first thing you type is random AHK output?  Or are you doing something in the background and switch back to chat then it happens?

I guess we should check the keyboard before saying it's not that, maybe it is just a bad design.  Disable AHK and run Aqua Key Test, check how many keys register at once and what happens when you hold caps and press lots of other keys - if it is the keyboard you will be able to see the 'stick'.  It may be two key rollover swith a typing optimised matrix so most of the time you're OK but if you hit the wrong three keys it forgets the first.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #13 on: Sat, 07 November 2020, 14:23:09 »
A new thing I've noticed... the keys seem to get stuck only on certain AutoHotKey keys.  By that I mean... it happens most often when I use the CapsLock-S-[another key]

I use this combo for my signatures (which sends text).

Any or all of the keys can get stuck.

But, for example... another key combo... say CapsLock-U-[another key]... any many more... don't seem to suffer the same issue.

Maybe a new keyboard with verified N-Key-Rollover is the answer?

Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #14 on: Mon, 09 November 2020, 13:09:12 »
well that would be one less variable for sure, and if you want a new keyboard anyway, that would be a good idea to take it, but i would not bet that it would fix it. if it does that means that your current keyboard is pretty bad, as no keyboards should crash and get stuck on any 3 keys presses.
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #15 on: Mon, 09 November 2020, 13:30:23 »
well that would be one less variable for sure, and if you want a new keyboard anyway, that would be a good idea to take it, but i would not bet that it would fix it. if it does that means that your current keyboard is pretty bad, as no keyboards should crash and get stuck on any 3 keys presses.

Yeah, but wouldn't you expect keyboards to get stuck on *some* specific three-key presses?  Wouldn't that be common, or no?

Common for normal keyboards that don't specify n-key rollover

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #16 on: Mon, 09 November 2020, 13:38:45 »
Did you try disabling AHK and running Aqua and pressing Caps+S+[key]?  This will confirm it's the keyboard that gets stuck not anything AHK related and if it is a new board will help, if you see no sticking it wont.

I would expect a board to release the first key when it runs out of rollover but it's up to the firmware designer so 'common' or 'normal' behavior in a keyboard is much like that of humans - most are nice and predictable but some are just *******s and do stupid things.

You still don't need n-key for 3-key combos, standard-works-everywhere 6-key is more than enough.
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #17 on: Mon, 09 November 2020, 13:43:58 »
Did you try disabling AHK and running Aqua and pressing Caps+S+[key]?  This will confirm it's the keyboard that gets stuck not anything AHK related and if it is a new board will help, if you see no sticking it wont.

I would expect a board to release the first key when it runs out of rollover but it's up to the firmware designer so 'common' or 'normal' behavior in a keyboard is much like that of humans - most are nice and predictable but some are just *******s and do stupid things.

You still don't need n-key for 3-key combos, standard-works-everywhere 6-key is more than enough.

Hi.  Here's the issue... it doesn't happen all the time in AHK.  It is really hard to replicate, but it happens enough that it is annoying.

I've played with Aqua (thank you to whoever suggested that, great tool).  I can't necessarily get it to "stick" like it does in AHK... but then again, maybe 9 times out of 10 (I don't know how often), it doesn't stick in AHK or anywhere anyway.  It's the 1 times out of 10 that is the problem.

And I can't figure out how to guarantee replication.  Very annoying all around.  If I could replicate, the debugging would be easier.



Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #18 on: Mon, 09 November 2020, 14:14:41 »
If you can't get it to stick in Aqua it's not the keyboard, it's tedious but keep trying.  You say it used to work then as you added more it started sticking so it may well be that one of the new combos is the one that's breaking it.

That or you're switching from combo back to typing at full speed and triggering some anti-ghost in the firmware that's confusing the controller into missing the key-up event.  Pretty sure it's only supposed to ignore key-down but maybe if the scanning logic runs the other way it happens on key-up instead (or as well?)

Not sure where you are and what you can do at the moment but can you swap keyboard with a friend or relative for a week to see what happens?  Would be cheaper than buying one...
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #19 on: Mon, 09 November 2020, 14:32:39 »
If you can't get it to stick in Aqua it's not the keyboard, it's tedious but keep trying.  You say it used to work then as you added more it started sticking so it may well be that one of the new combos is the one that's breaking it.

That or you're switching from combo back to typing at full speed and triggering some anti-ghost in the firmware that's confusing the controller into missing the key-up event.  Pretty sure it's only supposed to ignore key-down but maybe if the scanning logic runs the other way it happens on key-up instead (or as well?)

Not sure where you are and what you can do at the moment but can you swap keyboard with a friend or relative for a week to see what happens?  Would be cheaper than buying one...

I have multiple normal/not fancy/off the shelf keyboards.  Most of them miss a lot of three-key combos entirely.  They just don't register certain sets of three keys (I learned this is common in cheap keyboards).  Which is why I'm using the $50 keyboard I mentioned in the original post.  It works with all three-key combos, everything is "seen".  It just sticks randomly.

Other keyboards miss keys when attempting to bind them to my CapsLock-[KEY_1]-[KEY_2]

Offline yui

  • Posts: 1082
  • Location: 127.0.0.1 (in azerty)
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #20 on: Tue, 10 November 2020, 00:50:59 »
Other keyboards miss keys when attempting to bind them to my CapsLock-[KEY_1]-[KEY_2]
that is the correct and expected behavior of a 2 key rollover keyboard with anti ghosting, it is why your case of have stuck keys is particularly strange and that both SO and me expect it more to be software related than keyboard related
vi vi vi - the roman number of the beast (Plan9 fortune)

Offline cajhin

  • Posts: 5
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #21 on: Tue, 10 November 2020, 05:30:35 »
I would bet 10:1 that it is not the keyboard, but the software.
Your combos work, so it is obviously not an issue with ghosting.

What could happen is something along the lines of:
1. you press Caps+S
2. you press J
3. AHK starts sending a long text which takes a while
4. you release all keys
5. AHK is busy and does not process CapsLock up
6. Windows sees the key and toggles CapsLock state
7. AHK is finished and listening again, but confused by the CapsLock state

I'm not saying this is what happens, or that AHK works exactly that way. Just an example of how things fail.
I've used AHK for 10 years daily to use CapsLock for extensive cursor controls and special characters, and I ran into a couple of "WTF is happening here??"

In the end I wrote my own software; I can't recommend it to you since it doesn't do combos with multiple character keys (like S+J".

Check the AHK script log ("Press [F5] to refresh") and troubleshoot... would be my approach.

And don't let me discourage you from buying a new keyboard. One can never have enough keyboards :D


update: this is what I used in my  'final' AHK config:
;activate capslock with Lshift+Rshift, release with Rshift+Lshift
LShift & RShift::SetCapsLockState On
RShift & LShift::SetCapsLockState AlwaysOff

Also: check if the order in which you release the three keys makes any difference

SOAPBOX: THIS POST VERIFICATION IMAGE THING SUCKS, BRUTALLY.
Can we please have an AI that decyphers these images? I need 8 attempts on average
« Last Edit: Tue, 10 November 2020, 05:40:19 by cajhin »

Offline suicidal_orange

  • * Global Moderator
  • Posts: 4771
  • Location: England
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #22 on: Tue, 10 November 2020, 05:35:44 »
* suicidal_orange gets confused, dusts off old Cherry rubber dome...

You're right, this is bad.  At least I know why I got worse at FPS gaming after getting this board

Anyway, testing.  Caps+S+Lelt Alt+A - A doesn't register.  Release Left Alt - Left Alt is stuck pressed.  Release A - Left Alt unsticks.  This is 100% reproducible and shows a keyboard limitation, if it's your keyboard that's the problem there must be a specific combination of keys that does it.  You know Caps is one, you know what the last shortcut you used before the 'random' output was so you know two other keys that are involved so hold those three, press something else and release caps and see if you can get it to stick permanently.

Keyboards aren't complicated enough to do 'random' unless they are damaged and the chance of damaging 3 in exactly the same way is probably similar to winning the lottery.  Either you can make it stick or the problem is in your AHK.

If you just want an excuse to buy a nice keyboard few here will say it's a bad idea and if it persists you will know for sure that the problem is your AHK :thumb:
120/100g linear Zealio R1  
GMK Hyperfuse
'Split everything' perfection  
MX Clear
SA Hack'd by Geeks     
EasyAVR mod

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #23 on: Tue, 10 November 2020, 12:14:37 »
I would bet 10:1 that it is not the keyboard, but the software.
Your combos work, so it is obviously not an issue with ghosting.

What could happen is something along the lines of:
1. you press Caps+S
2. you press J
3. AHK starts sending a long text which takes a while
4. you release all keys
5. AHK is busy and does not process CapsLock up
6. Windows sees the key and toggles CapsLock state
7. AHK is finished and listening again, but confused by the CapsLock state

I'm not saying this is what happens, or that AHK works exactly that way. Just an example of how things fail.
I've used AHK for 10 years daily to use CapsLock for extensive cursor controls and special characters, and I ran into a couple of "WTF is happening here??"

In the end I wrote my own software; I can't recommend it to you since it doesn't do combos with multiple character keys (like S+J".

Check the AHK script log ("Press [F5] to refresh") and troubleshoot... would be my approach.

And don't let me discourage you from buying a new keyboard. One can never have enough keyboards :D


update: this is what I used in my  'final' AHK config:
;activate capslock with Lshift+Rshift, release with Rshift+Lshift
LShift & RShift::SetCapsLockState On
RShift & LShift::SetCapsLockState AlwaysOff

Also: check if the order in which you release the three keys makes any difference

SOAPBOX: THIS POST VERIFICATION IMAGE THING SUCKS, BRUTALLY.
Can we please have an AI that decyphers these images? I need 8 attempts on average

I forgot how to check the AHK log?  Can you refresh my memory?  Good idea.

Also note.... I've tried everything I can think of to make AHK force a CapsLock Up (SetCapsLockState AlwaysOff)... but it doesn't seem to fire when CapsLock is "stuck", I fix it by hitting the CapsLock key in real life.  That is the only solution, but I would be very open to a "hack" of any sort.



Offline cajhin

  • Posts: 5
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #24 on: Thu, 12 November 2020, 05:22:57 »
To check the AHK script, double click the tray icon.
Execute a key combo, then press F5. It shows you the script path that was run.

Note that CapsLock key (just a key) and CapsLock state (LED on, UPPERCASE) are different things.
I think SetCapsLockState AlwaysOff  tells AHK to not do CapsLock state.

To force clear the CapsLock key, I'd try an explicit Send {CapsLock Up} after your Send {long text} first

After playing with pretty much every combo style on many keyboards and Windows machines, I do all my combos with modifiers and one alpha key.
I think there's too much keyboard software involved that does not anticipate that two alphakeys pressed at the same time (like S+N) should have a special meaning. Pressing many modifiers at the same time (Shift+Ctrl+Alt+X) is standard and everything handles that properly.

Another style that should be standard enough is dead keys, like "Caps+S, release, then X". Difficult to code, though.

update: also consider what suicidal_orange wrote. I didn't think of that, when you press a combo that your keyboard can handle, and then press an additional key that is too much, it's up to the keyboard firmware what happens now.
« Last Edit: Thu, 12 November 2020, 05:25:06 by cajhin »

Offline downstairs

  • Thread Starter
  • Posts: 12
Re: Looking for keyboard recommendation for 3-key combos with AutoHotKey
« Reply #25 on: Thu, 12 November 2020, 09:09:15 »
To check the AHK script, double click the tray icon.
Execute a key combo, then press F5. It shows you the script path that was run.

Note that CapsLock key (just a key) and CapsLock state (LED on, UPPERCASE) are different things.
I think SetCapsLockState AlwaysOff  tells AHK to not do CapsLock state.

To force clear the CapsLock key, I'd try an explicit Send {CapsLock Up} after your Send {long text} first

After playing with pretty much every combo style on many keyboards and Windows machines, I do all my combos with modifiers and one alpha key.
I think there's too much keyboard software involved that does not anticipate that two alphakeys pressed at the same time (like S+N) should have a special meaning. Pressing many modifiers at the same time (Shift+Ctrl+Alt+X) is standard and everything handles that properly.

Another style that should be standard enough is dead keys, like "Caps+S, release, then X". Difficult to code, though.

update: also consider what suicidal_orange wrote. I didn't think of that, when you press a combo that your keyboard can handle, and then press an additional key that is too much, it's up to the keyboard firmware what happens now.

The really frustrating thing is sending {CapsLock Up} doesn't seem to help.  Heck... I tried putting {CapsLock Up} in a loop in a second script to hack at this, just to see if I could get {CapsLock Up} to solve things... and nope!