29

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.

14
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

  • 3
    Any way to make command+left or command+right go one word left or one word right instead of home and end? – trusktr Jan 29 '13 at 3:29
  • 2
    I really wish there was a poll somewhere of mac users who actually make this switch. – Micro Dec 7 '15 at 21:27
  • 2
    This also messes up our dear ALT-TAB ! – Cyril Duchon-Doris Apr 6 '16 at 14:44
  • 5
    How is this answering <SHIFT> + INSERT: Paste ? – A.D. Aug 28 '16 at 21:32
33

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

  • 2
    This doesn't work very well in some apps such as Finder. The problem is that sometimes the Menu item is named "Copy 6 items" or Copy file.txt, and then it doesn't work – Mike Blandford Mar 26 '15 at 14:23
  • 2
    How do you figure out the names for shortcuts? where can i see all available ones? because in my os there is only show help menu and nothing more... no autocomplete on new shortcut dialog – vach May 18 '15 at 7:06
  • for copy paste its logical but for example CTRL + Back i dont know the name and want to change it to Command + Back – vach May 18 '15 at 7:06
9

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>
  • 1
    Gave it a shot. It doesn't seem to work. Guess I'll have to get used to mac clipboard shortcuts. Thanks much. I'll try and read up on the links. First look, I didn't understand most of the things in these links :) – Code Poet Nov 27 '11 at 16:19
  • 3
    Created an account just to mod this up. KeyRemap4MacBook finally made me able to use ctrl/shift+ins/del on mac, this has really made my coding so much faster. I've dabbled with DoubleCommand, custom keymaps etc but this one just worked right out of the box. – Arne Jan 28 '14 at 9:22
  • 1
    @Arne Sadly the application stopped working with Sierra update. The KeyBindings file approach has never worked for me. – ficuscr Nov 17 '16 at 19:34
2

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

2

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 */
}
  • External links can go away. Please relate the most relevant contents here in your answer so the answer will always be here, and the link can serve for deeper research. – kmarsh Nov 10 '15 at 14:55
  • Ha, I forgot I even wrote this answer. I've probably repaved my Mac 5 times since I wrote it, and got used to the Mac shortcuts years ago. – Matt Frear Nov 11 '15 at 15:53
0

You can install and configure Karabiner app with the following configuration of private.xml file (edit in Misc tab):

<?xml version="1.0"?>
<root>
  <item>
    <name>Copy with Ctrl-Insert</name>
    <identifier>private.use_ctrl_insert_for_copy</identifier>
    <autogen>
        __KeyToKey__
        KeyCode::PC_INSERT, ModifierFlag::CONTROL_L,
        KeyCode::C, ModifierFlag::COMMAND_L
    </autogen>
  </item>
  <item>
    <name>Copy with Ctrl-C</name>
    <identifier>private.use_ctrl_c_for_copy</identifier>
    <autogen>
        __KeyToKey__
        KeyCode::C, ModifierFlag::CONTROL_L,
        KeyCode::C, ModifierFlag::COMMAND_L
    </autogen>
  </item>
  <item>
    <name>Cut with Shift-Delete</name>
    <identifier>private.use_shift_delete_for_cut</identifier>
    <autogen>
        __KeyToKey__
        KeyCode::DELETE, ModifierFlag::SHIFT_L,
        KeyCode::X, ModifierFlag::COMMAND_L
    </autogen>
  </item>
  <item>
    <name>Cut with Ctrl-X</name>
    <identifier>private.use_ctrl_x_for_cut</identifier>
    <autogen>
        __KeyToKey__
        KeyCode::X, ModifierFlag::CONTROL_L,
        KeyCode::X, ModifierFlag::COMMAND_L
    </autogen>
  </item>
  <item>
    <name>Paste with Shift-Insert</name>
    <identifier>private.use_shift_insert_for_paste</identifier>
    <autogen>
        __KeyToKey__
        KeyCode::PC_INSERT, ModifierFlag::SHIFT_L,
        KeyCode::V, ModifierFlag::COMMAND_L
    </autogen>
  </item>
  <item>
    <name>Paste with Ctrl-V</name>
    <identifier>private.use_ctrl_v_for_paste</identifier>
    <autogen>
        __KeyToKey__
        KeyCode::V, ModifierFlag::CONTROL_L,
        KeyCode::V, ModifierFlag::COMMAND_L
    </autogen>
  </item>
</root>

and enable newly created item after reloading the file in the Change Key tab.

Related: Remap Ctrl+C, Ctrl+V, and Ctrl-X only

-1

I can't make Karabiner Elements work for me for Sierra, no Insert key. I finally decided the issue is that I use my left hand to press modifier keys (ctrl, cmd, opt) and my right hand to press navigation keys (arrows, home, end, insert, delete). THAT'S WHY Cmd-C and Cmd-V are so awkward.

So I am experimenting with (through the System Keyboard Shortcuts above):

  • Cmd-[ for Copy
  • Cmd-[ for Paste
  • 1
    I'm having a hard time seeing how this is an actual answer and not commentary/feedback as to your trials/experiments.. – Allan Oct 5 '17 at 20:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .