ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA: Super Efficient Extended Hotkey Mapper

<< < (3/5) > >>

NeilS:
If you feel it's ahk's fault, post ait at the ahk forum. I'm sure they'll be able to provide a solution or if there is no solution, they'll solve it on the next release. At least, that's how it's happened with me ;)
-jgpaiva (October 26, 2006, 03:57 AM)
--- End quote ---

I just tried a search there and found a solution, as well as a better way to do what I was trying to do. :)

It turns out that AHK provides useful built-in variables for the previous and current hotkey, as well as the time since the last hotkey. Using them, DoubleKey() turns into:


--- ---DoubleKey(sendKeys, timeout)
{
  if(A_PriorHotKey = A_ThisHotKey and A_TimeSincePriorHotkey < timeout)
    Send, %sendKeys%
}

Pretty nifty. In fact, there's not really much benefit to my nice, neat function any more. ;)

The problem with using separate left/right Ctrl/Alt/Shift can be solved by doing two things.

First, the "repeating key when held down" issue is strangely solved by making the hotkey respond to key-up events instead of key-down events - you can do this by putting " Up" in the hotkey name. This also seems to solve a problem I noticed when you make the timeout quite short (200ms or less), where the trigger sometimes wouldn't work - this seems to be related to which key you are using.

The other issue that was happening was that the LCtrl/RCtrl versions weren't allowing normal CTRL+key presses to get through to other apps. This is fixed by using the "~" modifier, which tells AHK to pass the hotkey to the underlying app rather than swallowing it completely. This shouldn't be necessary, since CTRL+key is a different key to CTRL on its own, and isn't for the non-left-right versions, but it seems to be necessary for the left-right variants.

So my hotkey for running FARR is now:


--- ---~RCtrl Up:: DoubleKey("^!k", 200)

One other thing I noticed (while typing this actually), is that setting SHIFT as a double tap key can be slightly problematic depending on how fast you type. For me, quoted strings seem to involve a quick shift to make the " and then a quick shift to make the capital letter or symbol following it. It seems that I quite often do this sequence in less than 500ms, so I've got my timeout set at 200ms now. It's amazing the things you find out about yourself sometimes. :)

mouser:
im nearly done with taptap, should have a version out tonight.

nudone:
excellent.

mouser:
taptap is done and fully working.
but i'm too tired to post it now and it probably needs a little bit of a help file, so i'll post it tomorrow.
but it does seem to work well, and you can map the following things to other hotkeys

doubletap LeftControl
doubletap RightControl
doubletap LeftShift
doubletap RightShift
doubletap LeftAlt
doubletap RightAlt
doubletap Insert
doubletap capslock
doubletap numlock
doubletap scrolllock

pause key

winkey+Key combinations


so all you crazy people who like double tapping to do stuff, now you should be in heaven..
and as promised, it is super super lightweight on cpu and memory.

mouser:
I have finished "TapTap Hotkey Extender", or at least the first beta version.

Web Page: https://www.donationcoder.com/Software/Mouser/TapTap/index.html
Forum Thread: https://www.donationcoder.com/forum/index.php?topic=5971.0

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version