updated with advanced keyboard API