Emacs on Mac OS X Leopard key bindings

后端 未结 13 1124
予麋鹿
予麋鹿 2020-11-28 00:21

I\'m a Mac user and I\'ve decided to learn Emacs. I\'ve read that to reduce hand strain and improve accuracy the CTRL and CAPS LOCK keys should be swap

相关标签:
13条回答
  • 2020-11-28 01:04

    I would like to recommend 2 softwares Seil and Karabiner. By simply installing Seil and following the instructions in the software, you should be able to achieve what you want. From my experience, Karabiner is more powerful. I have a Japanese keyboard whose layout is different from the normal ones. I have some snippet which remaps two extra keys on my keyboard to F18 and F19 for other use. You can use the same syntax to edit your "private.xml" file to do more things.

    0 讨论(0)
  • 2020-11-28 01:05

    Personally i have setup caps lock to behave like command on the system preferences and then on my emacs init.el file have:

    (setq mac-command-modifier 'ctrl)

    and this lets me use caps lock as command in most osx applications and as control in emacs. works well enough for me.

    0 讨论(0)
  • 2020-11-28 01:05

    I've created a fairly comprehensive set of bindings here for use outside of Terminal.

    Personally, I can't use the mac laptop keyboard due to the absence of the right control key.

    Instead, I have been using the Microsoft Natural Ergonomic Keyboard 4000 for over 7 years: it's got really fat, well-positioned Ctrl and Alt keys, and after downloading its drivers the "Start" and "Application" keys are trivially remapped to the Mac Cmd key, which is also fat and easily depressed.

    To avoid emacs ergonomic concerns I've trained myself to use Ctrl, Alt, and Cmd the same way we use Shift - depressing them with the hand opposite the one typing the actual key. (That is, I just leave Caps Lock as is.)

    0 讨论(0)
  • 2020-11-28 01:09

    The other answer was very complete, but additionally I'd mention I just set the caps lock key to a second control key instead of swapping them.

    Also, you'll notice that the large majority of the text entry fields in Mac OS X already accept emacs keystrokes (^A beginning of line, ^E end of line, ^P, ^N, ^K, ^Y, etc)

    good luck

    0 讨论(0)
  • 2020-11-28 01:12

    Swapping CTRL and CAPS LOCK

    1. Go into System Preferences
    2. Enter the Keyboard & Mouse preference pane
    3. In the Keyboard tab, click Modifier Keys...
    4. Swap the actions for Caps Lock and Control.

    alt text

    Using ALT/OPTION as META

    1. In the menu bar, click Terminal
    2. Click Preferences...
    3. Under the Settings tab, go to the Keyboard tab
    4. Check the box labeled Use option as meta key

    alt text

    That's it! You should be well on your way to becoming an Emacs master!

    0 讨论(0)
  • 2020-11-28 01:14

    If you use emacs over an ssh connection, or through a machine not on your local computer, the page up/page down buttons scroll through the terminal buffer - in my experience, not too helpful.

    You can set your page down and page up buttons to send the appropriate commands to emacs. In emacs, you can scroll through the emacs buffer like so:

    • Page Up: Ctl-v
    • Page Down: Esc-v

    So, to have the terminal send these commands to emacs, follow the instructions above to alter the Alt keys for Meta. However, instead of setting the "use option as meta" option, find the "page down" and "page up" options.

    Page Down

    Double click the "page down" option to edit it. Change Action to "send string to shell" and enter \026 as the string. Save it.

    Page Up

    Double click the "page up" button to edit it. Change Action to "send string to shell" and enter \033v as the string. Save it.

    0 讨论(0)
提交回复
热议问题