Keybinding to different languages

I am new to atom and I majorly use C++ and python for programming. I wanted to key-bind f5 for python run and f7 for gcc-compile and run. How can I do this in the keymap file, so that the two languages can be used simultaneously. Thanks in advance.

I truly find that I can run my list of languages by using just process-palette package. First check that C++ and Python run normally in external terminal (without Atom). Then copy each such command into a process-palette process adding arguments such as filepath (you can have any number if you explore process -palette settings). Now for each such process settings (Run C+ and Run Python in your case) you can define Menu bar entries and/or key settings for each process. I have created a topbar menu named Run and submenus are Python, R, Lua etc. Key settings you choose might clash with other packages and you can check through resolver.