How can I reassign the copy/paste keyboard shortcuts?

I've been using mac for years, but prefer to do software development on windows. I'm really used to is using the folowing shortcuts on windows very much:

<CTRL>  + INSERT: Copy
<SHIFT> + INSERT: Paste
<SHIFT> + DELETE: Cut

Of late, I've taken to doing even my development work on the Mac. However, as a matter of habit, I'm missing these shortcuts very much. Actually, I find these a lot more convenient than COMMAND + (C/V/X) combo.

Is there a way to reassign these three shortcuts at least?

I've look all over the internet and in the "Keyboards" system preferences but I did not find anything.

PS: If you're wondering where I find the INSERT keys on a mac book pro, I use a wireless keyboard.


Solution 1:

System Preferences: Keyboard: Modifier Keys...

Then swap the Command and Control keys. This will change everything globally for all keyboard commands system-wide.

enter image description here

Solution 2:

This worked great for me to serve just the cut/paste/copy features I use so oftenenter image description here

Solution 3:

Try creating ~/Library/KeyBindings/ and saving a property list like this as DefaultKeyBinding.dict:

{
    "^\UF727" = copy:; // control-insert
    "$\UF727" = paste:; // shift-insert
    "^\UF728" = cut:; // control-delete
}

I don't have a keyboard with an insert key, so I couldn't test if the first two settings work. The last setting works for me though.

Edit: another option is to use Karabiner (formerly KeyRemap4MacBook):

<autogen>__KeyToKey__ KeyCode::PC_INSERT, VK_CONTROL | Modifierflag::NONE KeyCode::C, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::PC_INSERT, VK_SHIFT | Modifierflag::NONE, KeyCode::V, ModifierFlag::COMMAND_L</autogen>
<autogen>__KeyToKey__ KeyCode::FORWARD_DELETE, VK_SHIFT | Modifierflag::NONE, KeyCode::X, ModifierFlag::COMMAND_L</autogen>

Solution 4:

I use Ctrl-Ins, Shift-Ins, etc too.

The solution described is here, as well as remapping Home and End keys to be more Windows-like, e.g.

  • Open TextEdit under the Applications folder. If TextEdit was already open, create a new document using File->New. There should be a window labeled 'Untitled'.
  • Select the text within the window below, copy it, and then paste it into your new TextEdit window.
  • In TextEdit, convert this to plain text (the default is rich text) by selecting Format->Make Plain Text.
  • Next, select File->Save As... In the "Save As" dialog box, navigate to your home directory (look under PLACES on the left side for a house picture that has your name next to it). In your home directory, double-click on the Library folder. If you see a KeyBindings folder then double-click on it. If not, then click on "New Folder" (within the Library directory), name the new folder KeyBindings (with no space), and then double-click on it. Type DefaultKeyBinding.dict for the filename (at the top) and then click Save.
  • Warning: TextEdit will sometimes try to 'help' you by appending a .txt extension to the filename. Make sure this doesn't happen. If asked to use a .txt extension, tell TextEdit to instead use .dict. It will not work if you use .txt. If you have trouble, see comment by Nathan below.
  • Before these changes take effect, you need to log out and then log back in.

The code to paste into ~/Library/KeyBindings/DefaultKeyBinding.dict file is this one:

/* ~/Library/KeyBindings/DefaultKeyBinding.Dict
This file remaps the key bindings of a single user on Mac OS X 10.5 to more closely
match default behavior on Windows systems.  This particular mapping assumes
that you have also switched the Control and Command keys already.

This key mapping is more appropriate after switching Ctrl for Command in this menu:
Apple->System Preferences->Keyboard & Mouse->Keyboard->Modifier Keys...->
Change Control Key to Command
Change Command key to Control
This applies to OS X 10.5 and possibly other versions.

Here is a rough cheatsheet for syntax.
Key Modifiers
^ : Ctrl
$ : Shift
~ : Option (Alt)
@ : Command (Apple)
# : Numeric Keypad

Non-Printable Key Codes

Up Arrow:     \UF700        Backspace:    \U0008        F1:           \UF704
Down Arrow:   \UF701        Tab:          \U0009        F2:           \UF705
Left Arrow:   \UF702        Escape:       \U001B        F3:           \UF706
Right Arrow:  \UF703        Enter:        \U000A        ...
Insert:       \UF727        Page Up:      \UF72C
Delete:       \UF728        Page Down:    \UF72D
Home:         \UF729        Print Screen: \UF72E
End:          \UF72B        Scroll Lock:  \UF72F
Break:        \UF732        Pause:        \UF730
SysReq:       \UF731        Menu:         \UF735
Help:         \UF746

NOTE: typically the Windows 'Insert' key is mapped to what Macs call 'Help'.  
Regular Mac keyboards don't even have the Insert key, but provide 'Fn' instead, 
which is completely different.
*/

{
"\UF729"   = "moveToBeginningOfLine:";                       /* Home         */
"@\UF729"  = "moveToBeginningOfDocument:";                   /* Cmd  + Home  */
"$\UF729"  = "moveToBeginningOfLineAndModifySelection:";     /* Shift + Home */
"@$\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; /* Shift + Cmd  + Home */
"\UF72B"   = "moveToEndOfLine:";                             /* End          */
"@\UF72B"  = "moveToEndOfDocument:";                         /* Cmd  + End   */
"$\UF72B"  = "moveToEndOfLineAndModifySelection:";           /* Shift + End  */
"@$\UF72B" = "moveToEndOfDocumentAndModifySelection:";       /* Shift + Cmd  + End */
"\UF72C"   = "pageUp:";                                      /* PageUp       */
"\UF72D"   = "pageDown:";                                    /* PageDown     */
"$\UF728"  = "cut:";                                         /* Shift + Del  */
"$\UF727"  = "paste:";                                       /* Shift + Ins */
"@\UF727"  = "copy:";                                        /* Cmd  + Ins  */
"$\UF746"  = "paste:";                                       /* Shift + Help */
"@\UF746"  = "copy:";                                        /* Cmd  + Help (Ins) */
"@\UF702"  = "moveWordBackward:";                            /* Cmd  + LeftArrow */
"@\UF703"  = "moveWordForward:";                             /* Cmd  + RightArrow */
"@$\UF702" = "moveWordBackwardAndModifySelection:";   /* Shift + Cmd  + Leftarrow */
"@$\UF703" = "moveWordForwardAndModifySelection:";   /* Shift + Cmd  + Rightarrow */
}

Solution 5:

System Preferences -> Keyboard -> Keyboard Shortcuts

You can change (or assign) several hotkeys by finding in the list and then clicking on the key assigned and then typing the new one to replace.

To replace (for example) a "copy" operation in a specific program add an entry for the program in you are using (or for all programs). In the menu title box, type EXACTLY the menu text of the item i (e.g. Copy) as the text. Restart the application and click on the menu item within the program, you will find that this has been replaced with your custom shortcut