Remove unused imports in key handler