Added keyboard state stuff