AutoHotkey Community

It is currently May 27th, 2012, 10:02 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: December 22nd, 2006, 12:21 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
The following script remaps the Fn key nearly as the Left Win key.

Code:
~SC163 up::           
  Input, OneKey, T2 L1, {LControl}{RControl}{LAlt}{RAlt}{LShift}{RShift}{LWin}{RWin}{AppsKey}{F1}{F2}{F3}{F4}{F5}{F6}{F7}{F8}{F9}{F10}{F11}{F12}{Left}{Right}{Up}{Down}{Home}{End}{PgUp}{PgDn}{Del}{Ins}{BS}{Capslock}{Numlock}{PrintScreen}{Pause}
  if (OneKey != TimeOut && OneKey != "")
    Send {LWIN Down}%OneKey%{LWIN Up}
return


The difference is that the Fn key must be released before some key is pressed: press and release Fn, then press e and windows explorer starts!
The Input waits for 1 character for 2 seconds, with a lot of EndKeys (taking from the example in the helpfile).

Well, it works for me anyway...


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: December 22nd, 2006, 12:34 pm 
Offline

Joined: June 6th, 2006, 3:19 pm
Posts: 1654
Location: Denmark
Note that Input have some limitations that makes
Code:
#f12:: msgbox you pressed win+f12

unaccessible through my Fn2LWin map.
I mostly use #a..#z for my hotkeys and these seems to work just fine.

Maybe some non-noob could suggest some better method?


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 15th, 2007, 4:46 pm 
Offline

Joined: April 4th, 2006, 7:40 pm
Posts: 7
Tonne, thank you for the example. It does work, but just takes a little reprogramming in my brain to press and release the function key first.

I reworked it a bit to match specific keys:
Code:
~SC163 up::           
  ; WindowKey shortcuts: e-Explorer, l-switch user, r-run, m-minimize windows
  keystowatch=e,l,r,m
  Input, OneKey, T2 L1,,%keystowatch%
  if (errorlevel == "Match")
    Send {LWIN Down}%OneKey%{LWIN Up}
return


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 18th, 2007, 4:39 pm 
Offline

Joined: October 1st, 2005, 11:26 pm
Posts: 43
Location: Finland
Hmm, wish I had seen this one before... tonne, that is... SO COOL!! :D

I have an IBM Thinkpad at my office at the university and whenever I cannot have my external keyboard connected I feel kind of helpless (sort of addicted to Win hotkeys, you see 8))

_________________
For the music lover who can sit and enjoy the sound of someone else's evolving nightmare.


Report this post
Top
 Profile  
Reply with quote  
PostPosted: January 15th, 2009, 11:45 am 
Offline

Joined: August 16th, 2008, 6:05 pm
Posts: 7
I want to start the IBM Thinkpad Presentation Manager (for switching to my two monitors profile).
Manually it is done by Fn+F7

How can I do this automatically by AutoHotkey?

Scancode of Fn key is vkFFsc163
I tried it many ways, but none succeeds:

Send, {vkFFsc163}{F7}
Send, {vkFFsc163 down}{F7}{vkFFsc163 up}

Any help apreciated!


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], sks and 21 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group