AutoHotkey Community

It is currently May 26th, 2012, 11:23 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: November 17th, 2009, 12:57 pm 
Offline

Joined: May 28th, 2009, 7:09 am
Posts: 8
Let's say I have a script which binds Ctrl+F to some method. But I also want to remap my AppsKey to Ctrl. How do I remap the AppsKey and still let it fire my own method when I press ApssKey+F. (Note: I don't want to redefine the hokey since there are lot's of hotkeys that should work with both keys).

I tried to do the following:

Code:
^f::SomeFunction()
AppsKey::Ctrl


When I press Ctrl+F, it triggers the function correctly, but when I press AppsKey+F, it doesn't trigger the function.

What's the best way to do this?
Thanks


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 17th, 2009, 1:34 pm 
Offline

Joined: May 17th, 2007, 12:07 pm
Posts: 1004
Location: Germany - Deutschland
Code:
^AppsKey::SomeFunction()
AppsKey::Ctrl

??


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 17th, 2009, 1:56 pm 
Offline

Joined: May 28th, 2009, 7:09 am
Posts: 8
Nope that doesn't work. I don't want to define the hotkey with AppsKey if possible so that it works with both Ctrl and AppsKey and I don't have to duplicate multiple hotkeys.

Also, the hotkeys you provided doesn't make AppsKey+F or even Ctrl+F work so it doesn't help.

Thanks for trying though


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 17th, 2009, 2:08 pm 
Offline

Joined: December 30th, 2005, 5:01 pm
Posts: 448
sickpuma wrote:
When I press Ctrl+F, it triggers the function correctly, but when I press AppsKey+F, it doesn't trigger the function.
I don't have that problem. But if you have many other hotkeys, then there's maybe another hotkey that overtakes when defined after this?
Code:
^f::msgbox %A_ThisHotkey% function  ; called with Ctrl-F and Ctrl-AppsKey
AppsKey::Ctrl


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: November 18th, 2009, 12:01 am 
Offline

Joined: May 28th, 2009, 7:09 am
Posts: 8
Yeah, you're right. I just tried it with a new script and it works both with #usehook on and off.

btw, I think you meant Ctrl+F and AppsKey+F, not Ctrl+F and AppsKey+Ctrl.


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: Cerberus, Maestr0, rbrtryn, Tipsy3000, XstatyK and 73 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