| View previous topic :: View next topic |
| Author |
Message |
sickpuma
Joined: 28 May 2009 Posts: 8
|
Posted: Tue Nov 17, 2009 11:57 am Post subject: How to remap a key such as Ctrl but still have it fire hkeys |
|
|
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 |
|
| Back to top |
|
 |
aaffe
Joined: 17 May 2007 Posts: 941 Location: Germany - Deutschland
|
Posted: Tue Nov 17, 2009 12:34 pm Post subject: |
|
|
| Code: | ^AppsKey::SomeFunction()
AppsKey::Ctrl |
?? |
|
| Back to top |
|
 |
sickpuma
Joined: 28 May 2009 Posts: 8
|
Posted: Tue Nov 17, 2009 12:56 pm Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Peter
Joined: 30 Dec 2005 Posts: 448
|
Posted: Tue Nov 17, 2009 1:08 pm Post subject: |
|
|
| 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 |
|
|
| Back to top |
|
 |
sickpuma
Joined: 28 May 2009 Posts: 8
|
Posted: Tue Nov 17, 2009 11:01 pm Post subject: |
|
|
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. |
|
| Back to top |
|
 |
|