18 comments

[ 0.28 ms ] story [ 43.4 ms ] thread
Is Cmd+R such a hard to reach combination to warrant the precious keyboard real state Caps Lock occupies? Me, I double mine as both Ctrl and Esc by using the excellent xcape https://github.com/alols/xcape on linux, and KeyRemap4MacBook otherwise.

I actually find it more relevant on my mac than on my linux box, since Ctrl on the Mac is in a horrible position, and it opens up a whole world of new easy shortcuts that conflict with little else. Plus Ctrl-C and Ctrl-L (clear) on the terminal.

Good point, however I honestly hit cmd+r more often than I hit Ctrl + anything. Whenever I do hit Control (such as in terminal for ctrl+c as you mentioned) it's much more deliberate and 'one-off'. Different workflows I guess.
I use my caps as both ctrl and escape by having it mapped to control. Then if you need escape ctrl+[. It requires one finger from each hand and is very quick to press. Then if I want to page up or down in vim I still have the ctrl button easily reachable for ctrl+d and ctrl+u, etc.
Remapping Caps Lock to Control is a worthwhile alternative for heavy bash/vim users. Makes shortcuts lie Ctrl-D a lot more natural to type. Besides, it's super simple to do in OSX settings.
Not only vim but also emacs. In fact, OS X affords an emacs readline-like capability throughout all text fields (just like bash). So you can use C-d to delete characters, C-e to go to the end of line, C-a to go to the beginning of a line, and a ton of other shortcuts mapped to Ctrl.
I use a modified US layout on OS X for retaining proper touch typing posture while using emacs: http://cl.ly/image/372T2o2X0T0r

Symmetric Ctrl keys that are easily reachable from home row makes a huge difference. I've moved '\' key to 'Insert' because I never use 'Insert' key (before that I'd configured Right Shift to insert '\' when it is not used as a modifier and insert '|' when I press both Shift keys at once but I couldn't set this up using Xmodmap so I went with a cross platform solution).

I agree that Command-R is a silly thing to remap to. Remapping to Control (which can be done through System Preferences) helps not only with bash and vim but with emacs keystrokes which are standard throughout the Cocoa text controls. This is one of the very first things I do when I set up a new Mac.
My caps-lock gets mapped to escape. On linux, or at least the flavors I'm using, this is super easy: Just drop the following into ~/.Xmodmap

    !! Delete the caps lock key
    clear lock
    !! Make caps lock map to <esc>
    keycode 0x42 = Escape
Another option is to run setxkbmap after X starts (using a ~/.xinitrc file or your favorite desktop environment's autorun feature.

  'setxkbmap -option caps:esc'

  'setxkbmap -option ctrl:nocaps' (my preference)

  'setxkbmap -option ctrl:swapcaps'
Debian (and derivatives) users can edit the last line in the /etc/default/keyboard file to do this globally.
(comment deleted)
Not a bad idea to use caps lock for a different key, but i guess it is not the big time saver to use it as cmd+r - takes pretty much the same time.

i also needed a tool to remap some keys - i'm living in germany but i'm using a us-int. keyboard to have it easier on coding. but also i wanted to use german letters: äöü without holding aou pressed and then press the number i need in the overlay of special chars.

now i have it on alt+a/o/u

i used Ukelele (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&...) for it - pretty easy tool, where you can create your complete own keyboard layout and set it up with your own icon and so on. And without less steps then explained in your todo list.

who might is interested in this us-german-layout (https://github.com/marvwhere/usgerman)

If you're a programmer, how do you not use Caps Lock?

People bitch about Caps Lock, but don't say a thing about the inexcusable lack of a real Delete key on Apple laptops and small keyboards. The lack of this basic key, year after, is idiotic.

So with the ever-diminishing value of physical media, what does Apple do? Put a dedicated Eject key on its keyboards, instead of Delete. And on the Air? Why no Delete key? And to make matters worse, you can't even remap Eject to be Delete, because Apple even more idiotically put a HARDWARE DELAY on the Eject key. Why? Because of all the fatal accidental CD ejections? If this is such a problem, why didn't they put Eject on some other key as a secondary function?

They pulled the same shit with Caps Lock: It doesn't work half the time, apparently because Apple put the same asinine hardware-delay BS on it for no apparent reason.

I contributed the "F12 to forward delete" hotkey to KeyRemap4MacBook, so you can stand using these things. Enjoy.

Not a bad idea to use caps lock for a different key, but i guess it is not the big time saver to use it as cmd+r - takes pretty much the same time.

i also needed a tool to remap some keys - i'm living in germany but i'm using a us-int. keyboard to have it easier on coding. but also i wanted to use german letters: äöü without holding aou pressed and then press the number i need in the overlay of special chars.

now i have it on alt+a/o/u

i used Ukelele (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&...) for it - pretty easy tool, where you can create your complete own keyboard layout and set it up with your own icon and so on. And without less steps then explained in your todo list.

who might is interested in this us-german-layout (https://github.com/marvwhere/usgerman)

A cool thing that PCKeyboardHack can do is have key remapping only apply when you're in a certain app. So, for example, I have Caps Lock mapped to <C-a> but only when I'm in iTerm2 (for switching between windows in screen)
I have it remapped to backspace (colemak layout). The problem I had under OS X was that key repeat didn't work. Additionally setting Capslock in the OS X settings to control solved that problem.
I have mine mapped to escape, for vim.
This is the thing I was afraid of about OS X. I'm using Arch Linux and I'm in love with Linux per se. I would love to buy Apple computers because of all the great things they offer (I saw it as Linux with complex things somewhere hidden, plus, Windows-like support for apps and games) and I would allow myself to do it because OS X is Unix based and it has decent terminal. This article somehow destroyed my hopes — it's too much to remap a key.