add OS detection and refactor keybindings
Merge pull request #7 from ibito/Detect-OS-#5

add OS detection and refactor keybindings