• Find me online:  coolest guy on the internet
Subscribe: Via E-mail | Blog Posts | Lifestream | Photos
  • BlogI like to write.
  • LifestreamPlaying online.
  • PhotosMy life in Photos.
  • ProfileAll about me.
  • ProjectsStuff I'm doing.
  • WikiA place for Geeks.
  • ContactGet in touch.

Justin Hartman

Posted on December 20, 2006 - by Justin Hartman

How to swap Control and Command keys on PowerPC

Debian Ubuntu

Hey, it looks like you're new here to my blog! You may want to consider subscribing to my RSS feed and you'll automatically get notified when I post a new blog entry. If web feeds aren't your thing then why not join my email list by clicking here. Thanks for stopping by.

As a previous Apple OS X user I find that having to use the control key on my keyboard versus the Apple command key a real pain in the backside. Most Windows users don’t have a problem with this as the transition from Windows to Linux is easy with regards to using the control key. I’ve searched and asked and low and behold nearly a month later I now know how to swap the two around.

In Ubuntu and Debian it’s not as simple as configuring a shortcut or keymap and it requires a little bug-fix to get it working just as I’m used to it coming from OS X. Here’s a little step-by-step HOW-TO on how to achieve this on both an iBook G4 keyboard as well as the standard Apple USB keyboard.

iBook G4 Keyboard (I guess this will work on most Apple notebooks)

Create a file in your home directory called .Xmodmap by following these steps.

In a terminal window type:

cd $home
vim .Xmodmap

In this new file add these two lines:

keycode 115 = Control_L
add Control = Control_L

From your terminal window:

xmodmap ~/.Xmodmap

Restart your computer and the next time you log in to Ubuntu or Debian it will prompt you to load your .Xmodmap file. Select it from the right side of the window and move it to the left and then load it. Once done your left apple key is now a ctrl key.

Standard Apple USB Keyboard

Follow the exact same steps as above but instead of inserting two lines in the .Xmodmap insert the following:

remove Control = Control_L
remove Mod4 = Meta_L
keycode 0x25 = Meta_L
keycode 0x73 = Control_L
add Control = Control_L Control_L
add Mod4 = Meta_L

The second example above will make both your Apple command keys control keys, disabling your control key completely and adds a bit more functionality for the larger Apple keyboards.

For both of these instructions you can also go into your keyboard shortcuts in gnome and change Alt+Tab application switching to Ctrl+Tab to allow you to switch between applications using your command+tab keys.

Peep on Gatorpeeps 

Share this post: Share this post with the world.
  • Gatorpeeps
  • Muti
  • Twitter
  • Posterous
  • Facebook
  • laaik.it
  • del.icio.us
  • Digg
  • Friendfeed
  • Google
  • LinkedIn
  • Ping.fm
  • Reddit
  • StumbleUpon
  • Technorati
You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

10 Comments

I'd love to hear yours!



  1. Visit My Website

    January 14, 2007

    Permalink

    Smaran said:

    You’re a genius, you know that?! I’ve been looking for some instructions like these for months now! I’m a Mac user and I hate having to use the control key in Ubuntu. I’m so sending a trackback your way. Now I can finally go to sleep (almost 5 AM here!).



  2. Visit My Website

    January 14, 2007

    Permalink

    Smaran said:

    You're a genius, you know that?! I've been looking for some instructions like these for months now! I'm a Mac user and I hate having to use the control key in Ubuntu. I'm so sending a trackback your way. Now I can finally go to sleep (almost 5 AM here!).



  3. Visit My Website

    January 18, 2007

    Permalink

    Justin Hartman said:

    It’s a pleasure. You should have a look at my new Debian Wiki http://linux.justinhartman.com – most items should work in Ubuntu as well.



  4. Visit My Website

    January 18, 2007

    Permalink

    Justin Hartman said:

    It's a pleasure. You should have a look at my new Debian Wiki http://linux.justinhartman.com – most items should work in Ubuntu as well.



  5. Visit My Website

    February 8, 2007

    Permalink

    Steve said:

    This is exactly what I have been looking for! Thank you.

    One question – keyboard shortcuts based on Ctrl-blah no longer seem to work in Firefox on my Ubuntu installation. They work everywhere else (Desktop, gedit, terminal, etc).

    Any idea why it does not work in Firefox?



  6. Visit My Website

    February 8, 2007

    Permalink

    Steve said:

    This is exactly what I have been looking for! Thank you.

    One question – keyboard shortcuts based on Ctrl-blah no longer seem to work in Firefox on my Ubuntu installation. They work everywhere else (Desktop, gedit, terminal, etc).

    Any idea why it does not work in Firefox?



  7. Visit My Website

    February 12, 2007

    Permalink

    Justin Hartman said:

    Hi Steve

    Sorry mate. No idea why it doesn’t work. It should work as this config works on both my ibook G4 and mac mini. Seems strange that you should have a problem.



  8. Visit My Website

    February 12, 2007

    Permalink

    Steve said:

    I just did an install of Ubuntu on my MacBook and used the first set of instructions – worked great, no problem with Firefox this time.

    The first time was on my G5 tower and I used the second set of instructions.



  9. Visit My Website

    February 12, 2007

    Permalink

    Justin Hartman said:

    Hi Steve

    Sorry mate. No idea why it doesn't work. It should work as this config works on both my ibook G4 and mac mini. Seems strange that you should have a problem.



  10. Visit My Website

    February 12, 2007

    Permalink

    Steve said:

    I just did an install of Ubuntu on my MacBook and used the first set of instructions – worked great, no problem with Firefox this time.

    The first time was on my G5 tower and I used the second set of instructions.



  • About me

    Justin HartmanI am a seasoned entrepreneur and currently the CEO of Afrigator, a startup which I co-founded in April 2007 and later sold a stake to MIH Internet Africa. This blog is mostly about my life, experience running a startup and thoughts on technology that I encounter along the way... read more.
  • Stuff I’ve written

    • Digital strategy in SA simply doesn’t exist
    • My Tattoo, what, where and why I did it
    • Social Code goes public, finally
    • Social Media ROI… does it exist?
    • My US trip as visualised by Flipboard
  • What people are saying

    • Tony R on What the Internet looked like in 1995
    • j on How important is money?
    • Kayla on Digital strategy in SA simply doesn’t exist
    • ASH on I must pay Netcare so my son can visit his brother!
    • Emy on My Tattoo, what, where and why I did it
© 2008 Justin Hartman - Living Life. Running a Startup. Loving Technology. Web Hosting Sponsored by WPWebHost.
Afrigator