Fixes #139 (Shift-F5 bug) and #95 (Cmd-Alt-P feature)
Merge pull request #147 from pepelsbey/master

Key handling refactoring