/* ~/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 makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
or replace @ with ^ in this file. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers | |
^ : Ctrl | |
$ : Shift | |
~ : Option (Alt) | |
@ : Command (Apple) | |
# : Numeric Keypad | |
Non-Printable Key Codes | |
Standard | |
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 | |
OS X | |
delete: \U007F | |
For a good reference see http://osxnotes.net/keybindings.html. | |
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. | |
*/ | |
{ | |
"@\UF72B" = "moveToEndOfDocument:"; /* Cmd + End */ | |
"~@\UF703" = "moveToEndOfDocument:"; /* Cmd + Option + Right Arrow */ | |
"@$\UF72B" = "moveToEndOfDocumentAndModifySelection:"; /* Shift + Cmd + End */ | |
"@\UF729" = "moveToBeginningOfDocument:"; /* Cmd + Home */ | |
"~@\UF702" = "moveToBeginningOfDocument:"; /* Cmd + Option + Left Arrow */ | |
"@$\UF729" = "moveToBeginningOfDocumentAndModifySelection:"; /* Shift + Cmd + Home */ | |
"\UF729" = "moveToBeginningOfLine:"; /* Home */ | |
"~\UF702" = "moveToBeginningOfLine:"; /* Option + Left Arrow */ | |
"$\UF729" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Home */ | |
"$~\UF702" = "moveToBeginningOfLineAndModifySelection:"; /* Shift + Option + Right Arrow */ | |
"\UF72B" = "moveToEndOfLine:"; /* End */ | |
"~\UF703" = "moveToEndOfLine:"; /* Option + Right Arrow */ | |
"$\UF72B" = "moveToEndOfLineAndModifySelection:"; /* Shift + End */ | |
"$~\UF703" = "moveToEndOfLineAndModifySelection:"; /* Shift + Option + Left Arrow */ | |
"\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) */ | |
"~j" = "moveBackward:"; /* Option + j */ | |
"~l" = "moveForward:"; /* Option + l */ | |
"~i" = "moveUp:"; /* Option + i */ | |
"~k" = "moveDown:"; /* Option + k */ | |
"@~i" = ("moveUp:","moveUp:","moveUp:","moveUp:","moveUp:","moveUp:","moveUp:","moveUp:",); /* Cmd + Option + j */ | |
"@~k" = ("moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown:","moveDown:",); /* Cmd + Option + j */ | |
"@\UF702" = "moveWordBackward:"; /* Cmd + LeftArrow */ | |
"@~j" = "moveWordBackward:"; /* Cmd + Option + j */ | |
"@\U007F" = "deleteWordBackward:"; /* Cmd + Backspace */ | |
"@\UF703" = "moveWordForward:"; /* Cmd + RightArrow */ | |
"@~l" = "moveWordForward:"; /* Cmd + Option + l */ | |
"@\UF728" = "deleteWordForward:"; /* Cmd + Delete */ | |
"@$\UF702" = "moveWordBackwardAndModifySelection:"; /* Shift + Cmd + Leftarrow */ | |
"@$\UF703" = "moveWordForwardAndModifySelection:"; /* Shift + Cmd + Rightarrow */ | |
} |
This comment has been minimized.
This comment has been minimized.
no luck geting this to work on Sierra +1 |
This comment has been minimized.
This comment has been minimized.
Likewise, doesn't seem to work on Sierra. |
This comment has been minimized.
This comment has been minimized.
While it's probably not the solution folks are looking for I ended up doing this in Keyboard Maestro. |
This comment has been minimized.
This comment has been minimized.
Keyboard Maestro was a great suggestion, it is working well for me. I miss Karabiner but this will do for now |
This comment has been minimized.
This comment has been minimized.
Using ~/Library/KeyBindings/DefaultKeyBinding.Dict to remap key bindings works for me under Sierra (10.12.5). Restarting a given app is required for the changes to take effect. |
This comment has been minimized.
This comment has been minimized.
@ggriffin have you tested this in HighSierra as well? |
This comment has been minimized.
This comment has been minimized.
I can confirm - works on HighSierra. |
This comment has been minimized.
This comment has been minimized.
Working on HighSierra on mine too |
This comment has been minimized.
This comment has been minimized.
works well for HighSierra! I was a bit confused that I need to create directory KeyBindings by myself, but it worked! And now I can use both cmd+c and ctrl+c. This is great, previously "Copy link" buttons didn't work for me and now they do! THANK YOU. |
This comment has been minimized.
This comment has been minimized.
Also working on High Sierra for me -- thanks!! I prefer using these mappings over Karabiner elements because Karabiner elements screws with VMware Fusion and this does not. |
This comment has been minimized.
This comment has been minimized.
Beautiful presentation of the code !!! Have any of you had any problems for overload any shortcut with any application (for changing the system default keybindings) ? Thanks !!! |
This comment has been minimized.
This comment has been minimized.
This is what did (macOS Mojave):
|
This comment has been minimized.
This comment has been minimized.
Where can I find the full reference of actions, like "moveToBeginningOfLineAndModifySelection"? Thanks! |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Following the suggestion of the author, switching Command by Control is a good one, however, to switch between applications and between guides got boring. Has anyone managed to solve this? |
This comment has been minimized.
This comment has been minimized.
Works great in Mojave 10.14.5 - lifesaver :) |
This comment has been minimized.
This comment has been minimized.
Not working for me :( I'm on Mojave 10.14.5 with a Microsoft Designer Keyboard and Brazilian layout (ABNT2) |
This comment has been minimized.
This comment has been minimized.
Did you follow the instructions properly? Go to Library folder in your home folder, not the library folder in the root. Create the folder KeyBindings and the file "DefaultKeyBinding.Dict", case sensitive. Then it should work. I have a Func Mechanical KB with Swedish layout (Pro) |
This comment has been minimized.
This comment has been minimized.
I indeed had copied to the Library folder in the root. It did work now! Thanks |
This comment has been minimized.
This comment has been minimized.
10.14.5 (18F132) - Home/End to the beginning/end of the line is not working for me using the Mac base mail compose window, TextEdit, or in this message box. Does this work for you all in these situations? |
This comment has been minimized.
This comment has been minimized.
Hint for people having problems: there are some unicode quotes mixed in with the ASCII quotes in the gist! I'm not sure if that's what fixed it for me, but I did replace the unicode quotes with ASCII quotes (among other things):
|
This comment has been minimized.
This comment has been minimized.
Truly, from the bottom of my heart, THANK YOU for sharing this. In concert with a fix for home/end in terminal, I can feel my once incredible pain when forced to use Mac OS slowly melting away. |
This comment has been minimized.
This comment has been minimized.
Working in Catalina (10.15 Beta) with no problem. |
This comment has been minimized.
This comment has been minimized.
Exactly what I was looking for, can't wait to test it. Thanks for sharing this. |
This comment has been minimized.
This comment has been minimized.
awesome!
|
This comment has been minimized.
This comment has been minimized.
Any way to make following work in terminal? Works everywhere great, but in terminal it does nothing except making some error noise or smth while using shortcuts. Thanks!
|
This comment has been minimized.
This comment has been minimized.
How do you replace simulate CMD-F with CTRL-F to search in a document or webpage. I've tried this : "^f" = "search:"; // ctrl-f but it is not working. I need the right keyword in place of search. Thank you. |
This comment has been minimized.
This comment has been minimized.
Why wouldn't you swap key modifier instead? If you after using PC layout first thing to do is to make |
This comment has been minimized.
This comment has been minimized.
I've tried but it doesn't meet my needs, because when I'm on the terminal, I do alot of CTRL+A, CTRL+E etc to move the cursor at the beginning of line, end of line, etc. Replacing CTRL by CMD via Key modifier intercept all those command line combinaisons. |
This comment has been minimized.
This comment has been minimized.
Gotcha - try this. Keyboard > Shortcuts > App Shortcuts > add for all applications > menu title |
This comment has been minimized.
This comment has been minimized.
Thank you it worked! I wasn't aware of that trick, I've just mapped several shorcuts in others applications too! |
This comment has been minimized.
This comment has been minimized.
Hi, I have created a file with I'm really new to Mac but I think it is the right folder username/Library/KeyBindings/DefaultKeyBinding.dict because my Logitech keyboard gets confused when I log off and on (e.g. scrolling direction gets inverted). Can you please help me? |
This comment has been minimized.
This comment has been minimized.
It's not gonna work if you put everything on one line - everything starting with {
"\UF72B" = "moveToEndOfParagraph:"; /* end */
"\UF729" = "moveToBeginningOfParagraph:"; /* home */
} |
This comment has been minimized.
This comment has been minimized.
Thank you very much! Unfortunately, it still doesn't work. Any other ideas?
Rolandas Valantinas <notifications@github.com> schrieb am Fr., 3. Jan.
2020, 15:29:
… Hi, I have created a file with
{ "\UF729" = "moveToBeginningOfParagraph:"; // home "\UF72B" =
"moveToEndOfParagraph:"; // end }
I'm really new to Mac but I think it is the right folder
username/Library/KeyBindings/DefaultKeyBinding.dict because my Logitech
keyboard gets confused when I log off and on (e.g. scrolling direction gets
inverted).
Can you please help me?
It's not gonna work if you put everything on one line - everything
starting with home is a comment resulting in } being commented and
breaking file. Try:
{
"\UF72B" = "moveToEndOfParagraph:"; /* end */
"\UF729" = "moveToBeginningOfParagraph:"; /* home */
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://gist.github.com/1e5e516df4e8032cbc3d?email_source=notifications&email_token=AOFXIMHQ626UVY4KJA54YOLQ35DV5A5CNFSM4HH4CLQ2YY3PNVWWK3TUL52HS4DFVNDWS43UINXW23LFNZ2KUY3PNVWWK3TUL5UWJTQAF62I6#gistcomment-3126415>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOFXIMBNWWRNDLADDW4U4UDQ35DV5ANCNFSM4HH4CLQQ>
.
|
This comment has been minimized.
This comment has been minimized.
Each application has to be completely restarted (some has to be force quit) to use new shortcuts. I've tested these key bindings in |
This comment has been minimized.
This comment has been minimized.
Don't post misguided information! Maybe that particular scenario doesn't work, but |
This comment has been minimized.
This comment has been minimized.
Turns out it was just a local problem of mine. It works properly also on Catalina 10.15.2 |
This comment has been minimized.
This comment has been minimized.
Thank you very much, it works out for me as well. Turned out, the file ending *.txt was still omitted. |
This comment has been minimized.
This comment has been minimized.
This is my first Mac (Catalina 10.15.2) and some of the built in keys were driving me crazy after using Windows for decades, so I found this today and it's very helpful. However, while it mostly works, I have run into a few issues. For example, the END key does take me to the end of the line, but the HOME key takes me to the top of the page/document, instead of the beginning of the line. Well, some times END does what it's supposed to, but not always. Sometimes I have to press the key twice. The first time scrolls, the 2nd moves to the end of the line. OPTION + LEFT navigates left per work and doesn't take me to the beginning of the line. I restarted the computer, but still the same issues. Any way to fix these issues? |
This comment has been minimized.
This comment has been minimized.
I'm trying to use to mimic Windows' AltGr-Key (I have also switched CMD and CTRL). Unfortunately, it's not working. Am I missing something? |
This comment has been minimized.
This comment has been minimized.
Is there an exhaustive list of available commands for us to assign in this file? I'm looking for something like "switchWindows" to be assigned to Alt+Tab. The line |
This comment has been minimized.
This comment has been minimized.
I started off with KeyBindings to get the typing straight but realized that for me it only works for the Shift, Pos1, End stuff. |
This comment has been minimized.
This comment has been minimized.
The link in line 35 is dead, BTW |
This comment has been minimized.
This comment has been minimized.
https://web.archive.org/web/20161220060333/http://osxnotes.net/keybindings.html |
This comment has been minimized.
This comment has been minimized.
Just tried it in Catalina and works like a charm! Thanks! |
This comment has been minimized.
This comment has been minimized.
Any idea on how to get this to work on BigSur (11.1)? The dictionary file is no longer accessible at that path on the filesystem. |
This comment has been minimized.
This comment has been minimized.
I don't think Catalyst apps support usage of that file https://www.reddit.com/r/mac/comments/jv97u8/catalyst_apps_ignore_defaultkeybindingdict/ |
This comment has been minimized.
This comment has been minimized.
Oh! So, no key binding is possible on BigSur? |
This comment has been minimized.
This comment has been minimized.
This worked for me on BigSur 11.1:
Original thread: https://discussions.apple.com/thread/251108215 FYI, it saves the file in this location: |
This comment has been minimized.
Nice mappings. I'm having no luck getting this to work on Sierra. Have you been able to get it to work?