Fix for PyQt 4.7

Older versions of Qt do not have the swap() method for QKeySequence
objects, so they must be re-instantiated instead.