| View previous topic :: View next topic |
| Author |
Message |
John H
Joined: 27 Feb 2005 Posts: 2
|
Posted: Sun Feb 27, 2005 9:23 pm Post subject: swap control and alt keys |
|
|
| Is there a way to swap the control and alt keys? I'd like to do this for both right and left keys, simply swap them. I've made several attempts based on the examples in the help files but they don't seem to work. What I get seems to be that a single press of control sends an alt (and activates the menus), and vice versa I suppose. But I want this to work with key-combinations as well. Can AutoHotkey do this? |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Tue Mar 01, 2005 1:51 am Post subject: |
|
|
Making Alt become Control seems to work okay on NT4/2k/XP. Here is the newer method that requires v1.0.28 or later:
*LAlt::Send {LControl down}
*LAlt up::Send {LControl up}
However, making Ctrl become Alt is more difficult because those two keys do not cooperate well with each other in that direction. The following seems to be a partial solution, but be warned that it might cause problems with Alt-Tab:
*LControl::Send {LControl up}{LAlt down}
*LControl up::Send {LAlt up}
There might be a way to add more logic to the above to handle Alt-tab better.
You could also try picking some other key (such as LWin) to become Alt and that should work using the method in the first example. |
|
| Back to top |
|
 |
John H
Joined: 27 Feb 2005 Posts: 2
|
Posted: Wed Mar 09, 2005 12:20 pm Post subject: |
|
|
I tried your suggestion and it seemed to work. A downside was that when using alt-tab, the graphic of running programs remained visible after the alt-key was deleted. But an even bigger problem was that AutoHotkey would hang. It looked as if the control-key was permanently pressed down, and disabling AutoHotkey didn't solve this. In some cases, all keys were blocked even after logging off my account. A restart was the only solution. I downloaded version 1.0.30 but that didn't solve the problem.
So I'm back to using TradeKeys for swapping control and alt and AutoHotkey for hotkeys of course. I'd prefer to use AhoutHotkey for swapping control and alt though, because TradeKeys swaps them for all accounts, not just mine. If there's a solution to this problem I'd be glad to hear it. |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10480
|
Posted: Wed Mar 09, 2005 4:05 pm Post subject: |
|
|
It's a complex area that's difficult to improve upon due to the risk of causing side-effects with other features or existing scripts.
You may already know that you can permanently remap keys to each other using the registry. It's "permanent" in the sense that it affects all accounts (I think) and also because the only way to undo it is change the registry back and then reboot.
If you want more info on this method, I can post it. |
|
| Back to top |
|
 |
|