Map any string to your Mac Keyboard (globally) I use Git - every time I pulled it asked me for a password.
typing them in every time is slowing me down.

pw : 12khdE32

Now, I'm thinking if I can map a string with the the keyboard on a Mac, command + \, then I won't have to type my long pw any more.

Goal

12khdE32 --> command + \

I've tried look into system preferences + download the app call Karabiner.

I'm not sure if this possible, but please let me know if you think this is possible to do. This will help me a lot.

Thanks.
This is more than possible with paid apps like TextExpander and Keyboard Maestro (which are two excellent apps that are great times savers beyond what you're looking for).

Another free option: set up a keyboard shortcut in the preferences pane such as ggh --> mypassword and then you save a few keystrokes.

And another free option which does exactly what you're looking for can be found as the first answer for this SuperUser question. 

Note that storing passwords like this is considered insecure.