Commit changes in styles and keydown