Slashdot Mirror


Matching Up Hotkeys for OS X and Linux GUIs?

I use a MacBook Pro for my main machine, but also have a Ubuntu desktop. I get irritated about switching between command-oriented hotkeys and ctrl-oriented hotkeys (cmd-a on OSX = ctrl-a on Linux/windows). I've looked over a lot of forums and have found that Gnome doesn't seem capable of changing hotkeys, while xfce and fluxbox can. The ideal solution would be a way to change system keys in X, or at the system level — that way I can keep compiz. Does anyone have any ideas or know a trick to change system hot keys?

16 of 83 comments (clear)

  1. Pavlovian training by Anonymous Coward · · Score: 3, Funny

    Superglue a tack onto the control button of your mac. The negative reinforcement will help you learn.

  2. What? by Tubal-Cain · · Score: 2, Insightful

    I've looked over a lot of forums and have found that Gnome doesn't seem capable of changing hotkeys

    You mean System>>Preferences>>Keyboard Shortcuts doesn't really exist? Or am I misunderstanding?

    1. Re:What? by mbeans · · Score: 5, Informative

      IIRC, compiz has its own keybindings that override Gnome's.

      Install the ccsm package for a gui to configure it.

      --
      "It was a billion times better than cobol, but still really retarded." -AC
    2. Re:What? by Xelrach · · Score: 4, Insightful

      I'm looking at that right now and there aren't options for changing: copy, cut, paste, select all, which are the sorts of things I think he wants to change.

    3. Re:What? by rrp · · Score: 4, Informative

      even easier: in the Keyboard section (of the Keyboard & Mouse system pref) click the modifier keys button (on the lower left). There you can change the command key to be the control key. And switch other ones around too.

  3. Surely you jest by Frequency+Domain · · Score: 2, Informative
    System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts

    Go wild.

  4. xmodmap by Improv · · Score: 5, Informative

    man xmodmap

    --
    For every problem, there is at least one solution that is simple, neat, and wrong.
  5. Gnome (metacity, compiz), fluxbox, xbindkeys by SlashdotOgre · · Score: 2, Informative

    Well I have no experience with OSX, but as for Gnome, assuming you're using Metacity as your compositing window manager (and most distros do), you can set a ton of key bindings through gconf-editor. To access it, make sure gconf-editor is installed, then as the user running the WM (hopefully a non-privileged user), run gconf-editor. From there navigate to /->apps->metacity and bind away. You can also assign commands to key combos as well. If you're using Compiz, then install ccsm and keybindings are set under General Options. If on the odd chance you're using fluxbox, the keys are set in ~/.fluxbox/keys (hint: Mod1 == Alt).

    You may want to look into xbindkeys, an old app that is windows manager agnostic.The downside is whatever WM you use will also have its keybindings (not sure who wins out if the same key is bound twice). It's keys are specified in ~/.xbindkeysrc and it runs as a daemon.

    --
    Sadly, PS/2 was yet another victim of USB, which doesn't care what you plug into it, the electrical slut.
  6. live with it by Anonymous Coward · · Score: 2, Insightful

    sounds like you need to change the mac to bring it in line with everybody else, I drive a vintage car, the gear pattern and pedal arrangement is different to modern cars, ie; reverse is where 1st is normally found, but I have no problem driving it or switching it and a modern manual car.

  7. Re:first they need to fix a few things. by pushing-robot · · Score: 3, Insightful

    I'm sorry, but "delete" != "backspace", cmd a dos shell, and "option" belongs on a toolbar.

    For what it's worth, the apple/command key predates not only the dos shell, but MS-DOS itself. Same with the alt/option key. And "backspace" is a function on a typewriter.

    --
    How can I believe you when you tell me what I don't want to hear?
  8. Re:first they need to fix a few things. by m1ss1ontomars2k4 · · Score: 3, Insightful

    This is certainly one of the stupidest comments I've ever had the misfortune to read on Slashdot.

    First of all, I do have to admit that you are correct in stating "delete" != "backspace". However, you're using it to support the standard Windows-type keyboard, when in fact this little fact supports the Mac label. Backspace is supposed to move your current typing position one space backwards, not delete the character to the left of the cursor. Thus, "delete" is actually more appropriate. Some Mac-labeled keyboards are labeled with a symbol next to the delete keys explaining whether they are forward or backward delete.

    Cmd is a DOS shell, but only in later Windows (probably the NT family). Otherwise, command is the DOS shell. Also, you'll note that "command" or that funky symbol is the actual label for the key, not "cmd". At any rate, command makes far more sense than control as a shortcut. I want to issue the command with a code of q, x, c, v, or w. So I type command q, command x, etc. What the hell does control mean? I want to control the letter q? I want to control the command indicated by the letter q?

    As for the option key, that makes sense as well--pressing it will give you different options based on what other stuff you pressed. Right clicking on an application in the Dock will allow you to quite the application, but if you press option, you get the option to force quit instead. Besides, the option key is also labeled with alt, which, by the way, doesn't make sense when used without control. At least option makes sense without command.

    Also, buying a Mac keyboard for his desktop will not solve the problem; in fact that will only make things worse. The command key is the Windows key, but the relative position of that key on a Mac keyboard is switched as compared to a Windows keyboard. So he would try to type alt, but would get Winkey instead. Also, that wouldn't enable him to use command shortcuts in Linux, which was the entire point of the question.

    That said, I use a Windows keyboard with Mac OS X. I remapped the alt key to the command key and the Windows key to the option key. It works quite nicely.

  9. The compose key by tepples · · Score: 2, Informative

    "option" belongs on a toolbar.

    The Option key on Macs is closer to a compose key than anything else. It's how one enters the characters that are common in the numerous languages of Europe: press Option+e before a vowel to place the acute accent (e -> é) above it.

  10. Re:first they need to fix a few things. by Mr+Z · · Score: 4, Informative

    If you're going to trot out the Apple // line, you may as well know its history.

    For what it's worth, the apple/command key predates not only the dos shell, but MS-DOS itself.

    Not true. These were added on the Apple //e, which antedates MS-DOS. Take a look at the Apple ][+ as compared to the Apple //e.

    Same with the alt/option key.

    The closed-Apple key didn't become Option until the Apple IIgs. (The IIgs unit.) They weren't even on the Apple //e Enhanced. The familiar Macintosh Cmd and Option keys, though debuted with the original model, though there was no control key. But, then, a Mac isn't an Apple //, is it?

    And "backspace" is a function on a typewriter.

    So is "return" (as opposed to "enter"). Your point was again? Now get off my lawn.

    --Joe

    (I grew up with these machines, and I remember their sometimes frustrating differences well.)

  11. not many know it, but it's easy to set gnome keys by formal_entity · · Score: 5, Informative
    On gnome Ubuntu you can go to System::Preferences::Appearence::Interface and then you check "Editable menu shortcut keys". After that close the dialog and go to any GNOME application. Try for instance gedit (the "Text Editor" application in GNOME). Now what you do is that you open the File menu, then you hover above the Open menu item and you press CTRL-A or whatever. This instantly rebinds the "Open" menu item with CTRL-A and so on.

    It's a shame that GNOME had hidden this EXTREMELY useful functionality. GNOME was supposed to be easy and intuitive right? Yeah right :) ;)

    I've used this a lot to fix the keybindings in GNOME which is very much broken. For example, I want CTRL-G for "Go to line" in gedit and I want to be able to open new tabs with CTRL-T like I do in the browser (which is now setting the standard because I spend so much time in the browser so that's what my brain in wired up for).

  12. Remap Command to Control by RAMMS+EIN · · Score: 4, Interesting

    What I did was remap the Command key to generate a Control key event under X. That way, the shortcuts that work using Command under OS X and using Control under X can be accessed with the same key.

    I believe the following lines in my .xmodmaprc accomplish the remapping, but I haven't double checked:

    keycode 115 = Control_L
    keycode 116 = Control_L
    add Control = Control_L

    --
    Please correct me if I got my facts wrong.
  13. Re:first they need to fix a few things. by pushing-robot · · Score: 3, Informative

    The closed apple (command) and open apple (option) keys were on the Apple III keyboard. The Apple III was released in 1980, which does predate MS-DOS by a year.

    And my point was that "cmd" and "option" were associated with Apple long before they were a dos shell and a graphical menu. Even if the "option" key wasn't specifically labeled "option" until the Macintosh, it still predates any DOS use of "toolbars" that I'm aware of.

    Regarding "return" versus "enter", I agree with the other poster: "Return" has kept its function since the typewriter days. "Backspace" has not. The average user uses the "return" key to move down and return to the beginning of the line, not to enter a command. Conversely, the average user uses the "backspace" key to delete the last character (or some other object), not to back space, to perform a leftward space in order to type another character on top of the last character. In both cases Apple's label is more accurate than IBM's.

    --
    How can I believe you when you tell me what I don't want to hear?