Author Topic: How to swap Alt and Windows keys?  (Read 14432 times)

0 Members and 1 Guest are viewing this topic.

Offline jayfinger

  • Thread Starter
  • Posts: 32
How to swap Alt and Windows keys?
« on: Sun, 25 September 2011, 11:09:07 »
Probably a weird request for swapping those keys, but I'm running Win7 on a MacBook Pro.  I want to swap these keys because on a Mac the Alt key is to the left of the Command key (used as the Windows key), which is different from PC keyboards.  I want to swap them so that I don't have to think about it when I'm switching from from the MBP to a real PC keyboard.

I would prefer to do this with the registry setting (in ...\Keyboard Layout\Scancode Map).  Anybody have the right values for that?

Instructions for how to do this in AutoHotKey would also work.  I prefer the registry setting because it's in effect all the time, and not just after I log in and start AHK.

Thanks!

Offline theferenc

  • Posts: 1327
How to swap Alt and Windows keys?
« Reply #1 on: Sun, 25 September 2011, 11:13:26 »
You're looking for an application called KeyTweak. It let's you swap keys to your hearts content. You can either select from a list, or use what it calls "Teach" mode to just press the keys you want to swap.
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline jayfinger

  • Thread Starter
  • Posts: 32
How to swap Alt and Windows keys?
« Reply #2 on: Sun, 25 September 2011, 12:06:43 »
Thanks!

And at the same time you were posting that, I found SharpKeys and got it set up how I wanted.  Ok, I just played with KeyTweak and does basically the same thing:  a GUI around the low level registry entry that the Windows keyboard driver reads.  They're both exactly what I want.


In case anybody else wants to do this, here's my remapping (put this into a .reg file, save it, and import with RegEdit).  It does the follow:
Caps Lock --> Control (I do this on all my Windows machines, for emacs and frankly anything else)

Bottom Row:  remaps so that Macbook Pro works as:
Fn, Control, Windows, Alt, Space, Windows, ContextMenu

Code: [Select]

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,1d,00,3a,00,5b,e0,38,00,\
  38,00,5b,e0,5d,e0,38,e0,00,00,00,00


What would now make this perfect is to find some new keys for the MBP so that the legends were correct:  a 1-unit Windows key and a 1.25-unit Alt key.  But for the squirelly MBP keyboard.

Offline jayfinger

  • Thread Starter
  • Posts: 32
How to swap Alt and Windows keys?
« Reply #3 on: Mon, 26 September 2011, 10:03:00 »
Oh crap.  No Ctrl-Alt-Del doesn't work.  Everything is fine once logged in. But the only way to log in is to pull up the on-screen keyboard and click on Ctrl-Alt-Del.  Ouch!  Anybody have any ideas?

Offline theferenc

  • Posts: 1327
How to swap Alt and Windows keys?
« Reply #4 on: Mon, 26 September 2011, 20:23:13 »
Really? I remap control all the time that way, and never have an issue with it.

Silly suggestion: try using the original location of Alt. See if that works. Though, the new one should be system wide...
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball

Offline False_Dmitry_II

  • Posts: 1107
How to swap Alt and Windows keys?
« Reply #5 on: Mon, 26 September 2011, 20:31:10 »
Are there any per user settings in those programs? If not, I can't think of why that would be a thing.
"Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety." - Ben Franklin (11 Nov. 1755)

Offline shrap

  • Posts: 215
How to swap Alt and Windows keys?
« Reply #6 on: Mon, 26 September 2011, 20:49:17 »
Ctrl-Alt-Del was a special key combination that was supposed to provide a measure of security at the login screen, since it could not be captured by any other utility than Windows itself. It's completely possible that any key remapping software will simply not work at the login screen, but I'm not familiar with the software in question.

Offline HeavyArms

  • Posts: 119
  • Location: NoVA
  • "Lit"
How to swap Alt and Windows keys?
« Reply #7 on: Mon, 26 September 2011, 21:20:40 »
you dont need any kind of application for this, i've done this switch as well. Its simple system preferences drop down panel swapping.


1_ Open System Preferences

2_ Click on keyboard

3_ Click on the Keyboard tab

4_ Click on Modifier Keys (bottom right)

5_ Use the dropdown menu to select USB Keyboard

6_ Swap command for option, and option for command.

That easy.

-Trowa
« Last Edit: Mon, 26 September 2011, 21:34:50 by HeavyArms »
Head in the clouds.

Offline False_Dmitry_II

  • Posts: 1107
How to swap Alt and Windows keys?
« Reply #8 on: Mon, 26 September 2011, 21:29:16 »
Why gundam wing?

Also, he's asking about doing it in windows, not the mac os.
"Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety." - Ben Franklin (11 Nov. 1755)

Offline HeavyArms

  • Posts: 119
  • Location: NoVA
  • "Lit"
How to swap Alt and Windows keys?
« Reply #9 on: Mon, 26 September 2011, 21:34:37 »
Quote from: False_Dmitry_II;421822
Why gundam wing?

Also, he's asking about doing it in windows, not the mac os.

It worked for me that way... as I used to run 7 on my mbp as well.

Well because I pilot one? My name is Trowa Barton you know.
Head in the clouds.

Offline jayfinger

  • Thread Starter
  • Posts: 32
How to swap Alt and Windows keys?
« Reply #10 on: Thu, 29 September 2011, 02:57:49 »
Quote from: theferenc;421798
Really? I remap control all the time that way, and never have an issue with it.

Silly suggestion: try using the original location of Alt. See if that works. Though, the new one should be system wide...

Forgot to hold down "fn" while hitting the delete/backspace key.  It's Ctrl-Alt-Fn-Delete :-)  Works fine as long as my head isn't up my butt.

And it works with the remapped keys.  The labels on the keycaps are Ctrl-Command-Fn-Delete.

Offline theferenc

  • Posts: 1327
How to swap Alt and Windows keys?
« Reply #11 on: Thu, 29 September 2011, 19:26:42 »
Oh, right, that ridiculous Mac laptop layout. I always forget about that.
HHKB Pro 2 -- Custom UNIX layout Unicomp Customizer 101 -- IBM Model M 1391401 (modded to UNIX layout) -- IBM 1397000 (also UNIX layout) -- SSK in UNIX layout -- Model F 122 key in UNIX layout (Soarer USB "native")
 
CST L-TracX trackball -- Kensington Expert Mouse trackball