0.2 C
United States of America
Tuesday, November 26, 2024

keybindings – DefaultKeyBinding.dict not remaps ctl+arrow home windows shortcuts after MacOS replace


I’ve this


    "@UF702"  = "moveWordBackward:";                            /* Cmd  + LeftArrow */
    "@~j"      = "moveWordBackward:";                            /* Cmd + Possibility + j */
    "@U007F"  = "deleteWordBackward:";                          /* Cmd  + Backspace */

    "@UF703"  = "moveWordForward:";                             /* Cmd  + RightArrow */
    "@~l"      = "moveWordForward:";                             /* Cmd + Possibility + l */
    "@UF728"  = "deleteWordForward:";                           /* Cmd  + Delete */

    "@$UF702" = "moveWordBackwardAndModifySelection:";          /* Shift + Cmd  + Leftarrow */
    "@$UF703" = "moveWordForwardAndModifySelection:";           /* Shift + Cmd  + Rightarrow */

Very long time home windows consumer and on new job I wanted to onboard mac inside every week.

Ended up with following dict which made me productive

/* ~/Library/KeyBindings/DefaultKeyBinding.Dict

This file remaps the important thing bindings of a single consumer on Mac OS X 10.5 to extra
carefully match default habits on Home windows programs. This makes the Command key
behave like Home windows Management key. To make use of Management as a substitute of Command, both swap
Management and Command in Apple->System Preferences->Keyboard->Modifier Keys...
or substitute @ with ^ on this file.

Here's a tough cheatsheet for syntax.
Key Modifiers
^ : Ctrl
$ : Shift
~ : Possibility (Alt)
@ : Command (Apple)
# : Numeric Keypad

Non-Printable Key Codes

Normal
Up Arrow:     UF700        Backspace:    U0008        F1:           UF704
Down Arrow:   UF701        Tab:          U0009        F2:           UF705
Left Arrow:   UF702        Escape:       U001B        F3:           UF706
Proper Arrow:  UF703        Enter:        U000A        ...
Insert:       UF727        Web page Up:      UF72C
Delete:       UF728        Web page Down:    UF72D
Dwelling:         UF729        Print Display screen: UF72E
Finish:          UF72B        Scroll Lock:  UF72F
Break:        UF732        Pause:        UF730
SysReq:       UF731        Menu:         UF735
Assist:         UF746

OS X
delete:       U007F

For a superb reference see http://osxnotes.internet/keybindings.html.

NOTE: sometimes the Home windows 'Insert' key's mapped to what Macs name 'Assist'.
Common Mac keyboards do not even have the Insert key, however present 'Fn' as a substitute,
which is totally completely different.
*/

{
    "@UF72B"  = "moveToEndOfDocument:";                         /* Cmd  + Finish   */
    "~@UF703" = "moveToEndOfDocument:";                         /* Cmd + Possibility + Proper Arrow */

    "@$UF72B" = "moveToEndOfDocumentAndModifySelection:";       /* Shift + Cmd  + Finish */

    "@UF729"  = "moveToBeginningOfDocument:";                   /* Cmd  + Dwelling  */
    "~@UF702" = "moveToBeginningOfDocument:";                   /* Cmd + Possibility + Left Arrow */

    "@$UF729" = "moveToBeginningOfDocumentAndModifySelection:"; /* Shift + Cmd  + Dwelling */

    "UF729"   = "moveToBeginningOfLine:";                       /* Dwelling         */
    "~UF702"  = "moveToBeginningOfLine:";                       /* Possibility + Left Arrow */
    "@~UF702"  = "moveToBeginningOfLine:";                       /* Possibility + Left Arrow */

    "$UF729"  = "moveToBeginningOfLineAndModifySelection:";     /* Shift + Dwelling */
    "$~UF702" = "moveToBeginningOfLineAndModifySelection:";     /* Shift + Possibility + Proper Arrow */

    "UF72B"   = "moveToEndOfLine:";                             /* Finish          */
    "~UF703"  = "moveToEndOfLine:";                             /* Possibility + Proper Arrow */
    "@~UF703"  = "moveToEndOfLine:";                             /* Possibility + Proper Arrow */

    "$UF72B"  = "moveToEndOfLineAndModifySelection:";           /* Shift + Finish  */
    "$~UF703" = "moveToEndOfLineAndModifySelection:";           /* Shift + Possibility + Left Arrow  */

    "UF72C"   = "pageUp:";                                      /* PageUp       */
    "UF72D"   = "pageDown:";                                    /* PageDown     */
    "$UF728"  = "reduce:";                                         /* Shift + Del  */
    "$UF727"  = "paste:";                                       /* Shift + Ins */
    "@UF727"  = "copy:";                                        /* Cmd  + Ins  */
    "$UF746"  = "paste:";                                       /* Shift + Assist */
    "@UF746"  = "copy:";                                        /* Cmd  + Assist (Ins) */
    "@z"       = "undo:";                                        /* Cmd  + Z */
    "@y"       = "redo:";                                        /* Cmd  + Y */

    "~j"       = "moveBackward:";                                /* Possibility + j */
    "~l"       = "moveForward:";                                 /* Possibility + l */
    "~i"       = "moveUp:";                                      /* Possibility + i */
    "~k"       = "moveDown:";                                    /* Possibility + k */

    "@~i"      = ("moveUp:","moveUp:","moveUp:","moveUp:","moveUp:","moveUp:","moveUp:","moveUp:",);                            /* Cmd + Possibility + j */
    "@~k"      = ("moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown:",);                            /* Cmd + Possibility + j */

    "@UF702"  = "moveWordBackward:";                            /* Cmd  + LeftArrow */
    "@~j"      = "moveWordBackward:";                            /* Cmd + Possibility + j */
    "@U007F"  = "deleteWordBackward:";                          /* Cmd  + Backspace */

    "@UF703"  = "moveWordForward:";                             /* Cmd  + RightArrow */
    "@~l"      = "moveWordForward:";                             /* Cmd + Possibility + l */
    "@UF728"  = "deleteWordForward:";                           /* Cmd  + Delete */

    "@$UF702" = "moveWordBackwardAndModifySelection:";          /* Shift + Cmd  + Leftarrow */
    "@$UF703" = "moveWordForwardAndModifySelection:";           /* Shift + Cmd  + Rightarrow */

    "@UF700" = "moveUp:";                                        /* Cmd + Arrow up */
    "@UF701" = "moveDown:";                                      /* Cmd + Arrow down */
    "^UF700" = "moveUp:";                                        /* Ctrl + Arrow up */
    "^UF701" = "moveDown:";                                      /* Ctrl + Arrow down */

}

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles