Same key binding on Windows or Mac


#1

I want to use same key binding on Windows or Mac. (e.g. Ctrl-P is move up, Ctrl-N is move down, Cmd(alt)-F is search.)

Can Atom do this?

Or I think It’s better If Atom export keymap.cson include default key bindings.


#2

You can change all key bindings to your own preference in the keymap.cson. Whatever you put in there will override existing mappings.

https://atom.io/docs/v1.0.0/using-atom-basic-customization#customizing-key-bindings


#3

Thank you for reply.

I know I can overwrite existing key bindings with keymap.cson. But there is many default key bindings, I do not want to write all default key bindings myself.

So, I look for a way to export all key bindings include defaults or other way something to setting something like by setting file, environment variable or other.


#4

You mean synchronizing between two Atom instances, one on Windows and one on Mac?
The default key mappings are all part of both standard implementations, so you don’t have to worry about it. They will be the same across both platforms.

You’ll just need to add your keymap.cson ones, which is stored in the .atom folder under your user account. You can use an environment variable called ATOM_HOME to tell Atom where that folder can be found, so you could have it in a shared drive or dropbox folder where both your Mac and your Windows machine can access it.
This would synchronize all your settings and packages, including the keymap.


#5

There isn’t a built-in way to use the Windows key bindings on OS X. For example, on Windows the key to save a file is Ctrl+S, on OS X it is Cmd+S. If you want to use all of the Windows key bindings on OS X you would have to take the key bindings from Atom and every package, find the ones that start with .platform-windows and put them into your keymap.cson after changing .platform-windows to .platform-darwin.


#6

I can’t find .platform-windows in .atom and Atom app directory, but I understand what you saying. Also, It may be useful .platform-windows information for me. Thank you.


#7

Yes, I want to sync my key bindings, thank you useful ATOM_HOME variable. I will use this!
But just now, I look for a way to use same key bindings include defaults in Windows and Mac.

It seem I can resolve @leedohm 's information.

Thank you!