Use SharpKeys app to swap modifier keys. LControl becomes Winkey Winkey becomes LAlt LAlt becomes LControl This is not typical Mac Control-Alt-Command layout, but don't worry, we will make shortcuts work in the same manner your fingers are used to. The reason why we can't simply swap Win & Alt is because IntelliJ IDEA requires a lot of shortcuts with 'Command' key (which would be Windows key in our case), and it's impossible to make them work well.
So we stick to more traditional 'Control'-shortcuts on the OS level. But, again, don't worry, in the end shortcuts physically will be the same os on Mac OS X. Use AutoHotkey script 'OS X keyboard for Windows' to remap basic shortcuts (see 'OS X keyboard for Windows' AutoHotkey script).
Remap the surface pen button to launch whatever program you want in the script you just need to set the file location to whatever you want (as an example I currently have it loading up the desktop version of OneNote, but you could instead set it to Photoshop, Illustrator, etc. AutoHotkey script to remap some Mac shortcuts on Windows to make Windows more usable - AutoHotkeyMacMapping.ahk.
Feb 2, 2011 - How to Remap Any Keyboard Shortcut in Mac OS X. A keyboard shortcut on Windows using our favorite Windows scripting tool, AutoHotkey.
For IntelliJ IDEA users: 3.1. Disable Winkey OS shortcuts (e.g. Use provided ' keymap.