2 * Copyright 2013 The Chromium Authors. All rights reserved.
3 * Use of this source code is governed by a BSD-style license that can be
4 * found in the LICENSE file.
7 var kb = document.getElementById('keyboard');
10 * Finds the character specified and types it. Assumes that the default
11 * layout is qwerty, and the default keyset is lower.
12 * @param {{string}} char The character to type.
14 var type = function(char) {
15 var keyset = kb.querySelector('#qwerty-lower');
16 var keys = Array.prototype.slice.call(keyset.querySelectorAll('kb-key'));
17 var key = keys.filter(function(key) {
18 return key.charValue == char;
20 key.down({pointerId: 1});
21 key.up({pointerId: 1});
27 kb.addKeysetChangedObserver(function() {