Page 1 of 1
Autohotkey to simulate Home and End keys
Posted: 15 Jul 2014 16:29
by grindax
.
Re: Autohotkey to simulate Home and End keys
Posted: 15 Jul 2014 16:50
by binocular222
Depend on devices, I have never successed with my laptop's Fn
Re: Autohotkey to simulate Home and End keys
Posted: 15 Jul 2014 17:12
by bdeshi
I think assigning Fn in AHK will be difficult. Still,try this:
• Execute the following AHK script.
• Try NOT to press any more keyboard keys from this point.
• Double-click that script's tray icon to open its main window.
• Press the SPACEBAR. Press the fn key. Press SPACEBAR again.
• Select the menu item "View->Key history..."
• At the end of the visible text, you'll find the keydown and keyup records of Space, fnkey, Space IF your key was detected (else just two space keys are listed). Like this:
Code: Select all
20 039 d 5.69 Space
20 039 u 0.16 Space
xx xxx d 0.34 FnKey
xx xxx u 0.16 FnKey
20 039 d 0.27 Space
20 039 u 0.13 Space
• If your key was detected, make a note of the 3-digit hexadecimal value in the second column of the list (e.g. 159).
• To define this key as a hotkey, follow this example:
Code: Select all
~SCxxx & Left:: ; Replace xxx with your key's value.
send {Home}
return
~SCxxx & Right:: ; Replace xxx with your key's value.
send {End}
return
text slightly modified from: http://www.autohotkey.com/docs/KeyList.htm
Re: Autohotkey to simulate Home and End keys
Posted: 15 Jul 2014 17:31
by grindax
.
Re: Autohotkey to simulate Home and End keys
Posted: 15 Jul 2014 17:33
by bdeshi
Hmm, then the Fn key wasn't detected. There may be other ways, but I know none of them, wait for other AHK gurus. Or you can pay a visit to the AHK forum...
EDIT: curious: if you press FN+Left key, does that generate a different code than just pressing Left key?
Re: Autohotkey to simulate Home and End keys
Posted: 15 Jul 2014 21:04
by grindax
.
Re: Autohotkey to simulate Home and End keys
Posted: 16 Jul 2014 00:04
by grindax
.
Re: Autohotkey to simulate Home and End keys
Posted: 16 Jul 2014 18:08
by grindax
.