Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror
×
GNOME GUI Software User Journal

Matching Up Hotkeys for OS X and Linux GUIs? 83

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?

This discussion has been archived. No new comments can be posted.

Matching Up Hotkeys for OS X and Linux GUIs?

Comments Filter:
  • by Anonymous Coward on Saturday September 27, 2008 @03:22PM (#25178935)
    Superglue a tack onto the control button of your mac. The negative reinforcement will help you learn.
    • by Anonymous Coward
      I hate to say it, but RTFM. Same to slashdot editors who posted this.
  • What? (Score:3, Insightful)

    by Tubal-Cain ( 1289912 ) on Saturday September 27, 2008 @03:22PM (#25178937) Journal

    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?

  • Surely you jest (Score:3, Informative)

    by Frequency Domain ( 601421 ) on Saturday September 27, 2008 @03:23PM (#25178951)
    System Preferences -> Keyboard & Mouse -> Keyboard Shortcuts

    Go wild.

  • remap (Score:1, Informative)

    by Anonymous Coward

    you can remap your keys to anything you want
    works great for the lame "media keys" on all those $80 keyboards out there
    i havent done it in forever but you might want to read the man pages for 'xev' and 'xmodmap'

  • xmodmap (Score:5, Informative)

    by Improv ( 2467 ) <pgunn01@gmail.com> on Saturday September 27, 2008 @03:29PM (#25178983) Homepage Journal

    man xmodmap

    • by pbaer ( 833011 )
      You want xmodmap. I used it myself to change capslock to 0, along with some other minor changes. Run it to create a copy of your current keyboard layout. Back that up. Then change it so the keys do what you want. Not that difficult, should take you maybe 30mins.
  • by SlashdotOgre ( 739181 ) on Saturday September 27, 2008 @03:32PM (#25178999) Journal

    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.

  • Take a look at the examples at the bottom of the man page.
  • by Anonymous Coward

    Both OS do this, and it's very easy to figure out.

    If you can't find the flexibility you require built into the OS, at least on OSX I know their is another solution:
    http://doublecommand.sourceforge.net/

  • If you want to use a mac keyboard on your desktop you should buy one.
  • I'm sorry, but "delete" != "backspace", cmd a dos shell, and "option" belongs on a toolbar.

    that being said, I believe KDE has the ability to change global hotkeys. Maybe you should try a distro that uses it, or install it on your ubuntu. To my knowledge, compiz-fusion also supports hotkey remapping.

    Though, you could quite simply, just buy a mac keyboard for your desktop. That would probably make the most sense of all! Though not the cheapest sense.

    • by pushing-robot ( 1037830 ) on Saturday September 27, 2008 @04:07PM (#25179263)

      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.

      • by Mr Z ( 6791 ) on Saturday September 27, 2008 @04:34PM (#25179427) Homepage Journal

        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 ][+ [oldapplestuff.com] as compared to the Apple //e. [oldapplestuff.com]

        Same with the alt/option key.

        The closed-Apple key didn't become Option until the Apple IIgs. [old-computers.com] (The IIgs unit. [oldapplestuff.com]) They weren't even on the Apple //e Enhanced. [wikimedia.org] The familiar Macintosh Cmd and Option keys, though debuted with the original model, [aresluna.org] 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.)

        • So is "return" (as opposed to "enter").

          Wait, I thought that Return was on the keyboard and Enter was on the numeric keypad? :)

          • by Mr Z ( 6791 )

            Well, once Apple finally got a numeric keypad. On the PC, though, both have been named "enter" from the beginning.

            My point, of course, was that complaining about "backspace" being a typewriter function by citing "delete" as a better choice overlooks that "enter" is a better choice than "return" by similar reasoning.

            Someone just needs to hit RUN STOP-RESTORE on this whole thread. ;-)

            • My point, of course, was that complaining about "backspace" being a typewriter function by citing "delete" as a better choice overlooks that "enter" is a better choice than "return" by similar reasoning.

              More than half the time I hit that key, it's to insert a carriage return/newline in a text document, not to confirm input. Since most people (especially mac users) don't use command lines these days, I'd say it's probably at least as appropriate to call it "return" as it is to call it "enter".

              Backspace, on t

              • Just for the record, an IBM keyboard has a carriage return symbol on the Enter key.

                • technically it's more of a cr-lf symbol.

                  think typewriter with a roll for paper. the carriage was either the whole paper roller mechanism, or more modernly, the daisy wheel/ball mechanism.

                  The carriage return sent the typing position back to the left side at column 0.

                  The lf stands for line-feed. That's pretty obvious. the roller moved the paper up to the next empty line.

                  The enter is commonly used on computers since there's no paper roller on a screen and you are simply entering information into a stack or

              • by Mr Z ( 6791 )

                For the word processor users of the world, it should just have a "paragraph" symbol on it. After all, in a word processor, you're only supposed to press that key at the end of each paragraph, when you're done entering the paragraph.

                And carriage returns? What carriage would this be? If you're editing your documents the old fashioned way--and I still use vim plenty--the key should be labeled "new line" or similar. But wouldn't most Mac users be entering text in a word-processor-like environment that prov

                • At least "delete" actually deletes somethings on modern Apples, as opposed to inserting that checkerboard character like it did on the Apple //es.

                  You mean inserting the delete character? It's a damn hard to display character, so I am impressed by the checkerboard interpretation. ;-)

            • Well, once Apple finally got a numeric keypad.

              Well, it had one all along, but it was originally $99 extra :) And, the key on it wasn't called "enter"... it had some sort of Martian character on it! See this picture of the original Mac numeric keyboard. [aresluna.org]

              Someone just needs to hit RUN STOP-RESTORE on this whole thread. ;-)

              Sorry! I was just trying to be funny, not trying to start a flame war! :)

        • by pushing-robot ( 1037830 ) on Saturday September 27, 2008 @07:28PM (#25180561)

          The closed apple (command) and open apple (option) keys were on the Apple III [old-computers.com] 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.

          • by Mr Z ( 6791 )

            Indeed. For some reason I thought the Apple /// came out later than that. I remember those things. I used to write papers in /// Easy Pieces, and even played a bit with Pascal on it. I never got to play with Business BASIC, though I did see the demo. (Hastings Manufacturing, the piston ring manufacturer, had bought a bunch of these back in the day, and donated them to the public library and YMCA when they got rid of them. While I was in high school, I consulted for both, setting up the systems and the

            • Next up: The never ending confusion between the ASCII backspace (BS, character #8), the ASCII delete (DEL, #127), and the DEC VT-100 "Remove" escape sequence. :-)

              Oh, don't get me started on that. If you ever decide to build your freeze-ray, take over the world, and with your iron fist implement a set of sane universal input/text standards — from keyboard scancodes to character encodings — look me up. I've got all my minion gear right here.

    • Re: (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
    • The compose key (Score:3, Informative)

      by tepples ( 727027 )

      "option" belongs on a toolbar.

      The Option key on Macs is closer to a compose key [wikipedia.org] 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.

    • by Mr Z ( 6791 )

      No, cmd.exe is the Windows NT shell. WinNT and its offspring are not built on MS-DOS, though they do provide versions of most of its commands. You're thinking of COMMAND.COM.

  • live with it (Score:2, Insightful)

    by Anonymous Coward

    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.

    • by Tokerat ( 150341 )
      If you're running X11 inside OS X, this becomes a problem when some windows behave differently than other and you're trying to navigate quickly.

      I always found this argument to be counter-intelligent. Of course you can "live with it", but you can get more done quicker and easier if you change it to suit your needs.

      Then again, I suppose this explains a lot about the mentality of the Windows crowd...
      • And the gnome crowd, KISS means that the option hes looking for is in some gconf entry. IIRC when you add a new user to a kde system you are provided with a dialog that asks which base setup you want
        windows/mac/unix/linux and it then gives the basic window management and key binding to aproximate that system.

  • Most of the existing shortcuts in KDE are re-assignable, and you can make the desktop more Mac-like than Gnome in some respects:

    For instance, You can create a Mac-like menu-bar at the top where your app menus display instead of separately in each app window.

  • Or you can edit your .gtkrc file.

    Unfortunately, there are only 2 canned keybinding-sets shipped with GTK: "Default" (which is Windowsy, these days) and "Emacs" (which makes things behave like the GNU tools (Emacs, Bash, etc.) traditionally behave.

    These canned sets are defined in /usr/share/themes/*/gtk-2.0-key/gtkrc; I think that, if you make a new directory (where the "*" is), and create your own `gtkrc' file under it, the that name becomes valid in GConf. You may be able to find a Mac-alike gtkrc file tha

    • There are keybinding tools for OS X like doublecommand (http://doublecommand.sourceforge.net/).

      However OS X uses control for control. That is, like Gnome, ctrl-c in a terminal is ctrl-c, and unlike gnome, cmd-c in a terminal is copy, whereas gnome has to use shift-ctrl-c (IIRC) or something other than ctrl-c like copy is in other apps.

  • by formal_entity ( 778568 ) on Saturday September 27, 2008 @05:23PM (#25179759) Homepage
    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).

  • No one suggested just recompiling the Linux apps and running them under OS X? :)

    • I'm equally amazed that nobody suggested just dumping OSX and installing Ubuntu on your mac. ReFit is your friend. If you don't want to dual boot then just piss off the EFI partition and install Linux over the whole disk (not recommended because you won't be able to install firmware updates easily).

      OSX is lovely and shiny, but Unixy and all but they've hacked out just enough of the Unix-ness to make it annoying for hardcore (and seasoned) junkies.

    • Or Even better, Linux and associated apps are open source. Change the source code in every program to catch the keystrokes and match what the mac does.
  • There's an add-on [mozilla.org] for firefox that adds emacs keybindings to firefox. It added too many of the emacs keybindings for my taste, but it was easy to deactivate the ones I didn't like.

    • by jonadab ( 583620 )
      > There's an add-on for firefox that adds emacs keybindings to firefox.

      Except, it doesn't actually add Emacs functionality, so it's kind of worthless. Nobody uses Emacs for its default keybindings. (Indeed, a lot of us have made significant alterations to the key bindings in Emacs.) We use Emacs because we need software that does certain things, and the only choices are Gnu Emacs and XEmacs. Nothing else has the needed functionality.
      • Except, it doesn't actually add Emacs functionality, so it's kind of worthless.

        The OP was about getting keybindings consistent on different machines, because he had certain keybindings in his muscle memory.

        Nobody uses Emacs for its default keybindings.

        Mm...how did you gain telepathic insight into the mind of every emacs user in the universe? All I care about is the keybindings of emacs. In fact, most of the time I use one of the smaller emacs clones, such as mg, because they're faster. The keybindings

  • by RAMMS+EIN ( 578166 ) on Saturday September 27, 2008 @06:18PM (#25180107) Homepage Journal

    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

    • 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.

      What happens when you're using an xterm or terminal, and you push command-c? What happens if you push control-c? Because in a terminal, I'd expect control-c to stop the currently running program, or terminate and discard the current line of entry. Of course, if you don't use xterms or terminals, you probably don'

  • Most DEs will give you a way to change this. Otherwise you can use xmodmap.

    That said, I prefer the Mac way of doing things (map the command key to Super) because it means (a) you get a greater reach over the keyboard when entering shortcuts one-handed, and (b) reserves Control as a modifier or for entering escape sequences in the console. Just my tuppence's worth...

  • I am relatively new to the OS-X world myself (been using it for about 7 months now; I was a Linux user for 10 years, and a SunOS Unix user for about 10 years before that). At first I was annoyed about not being able to do some of the key remapping under OS-X that I used to do under Linux (e.g. I didn't see any easy way to turn the backquote/tilde key into an escape/tilde key, and the escape key into a backquote/tilde key).

    I then came across the following little program:
    http://www.pqrs.org/tekezo/macosx/key [pqrs.org]

  • You know what sucks? Spending time in pico that includes frequently searching for a string of text, and then trying to search for a string of text in Firefox.

    I'm really glad they added the Recently Closed Tabs feature.

  • All I want to know is where's the INSert key on mac keyboards?

    Us coders sometimes *gasp* toggle between insert & over-write for code and/or cmd line editing....

  • I recently got a Mini and managed to hook it up via a USB-to-PS/2 converter to my KVM, to which is attached a real IBM keyboard, which I really don't want to replace. So I had to figure out how to make Ctrl act like Command on the Mac. IMO this is very natural - Ctrl is in a better location, and now Mac-style commands that I'm already used to, like Ctrl-W to close a window, work the same on all 3 platforms with the same keyboard. What annoys me though is when using the Mac terminal, I have to use a diffe

  • The simple answer is Peter N. Lewis's excellent "Keyboard Maestro" http://www.keyboardmaestro.com/main/ [keyboardmaestro.com] . I started confusing Emacs keyboard combinations with OS X's native (like always pressing C-x, C-s to save a document even when written in TextEdit). It is remarkably configurable and before long your Linux keyboard shortcuts will work on your Mac. Note of caution though, OS X's native Keyboard Shortcuts (System Prefs, Keyboard & Mouse) are really unstable and keep on getting forgotten - Keyboard Mae

"Ninety percent of baseball is half mental." -- Yogi Berra

Working...