fixed #24 & added keyboard support;