Refactoed to use new keyboard package.