Improved keyboard support