blob: d944d8e8490dcfd7b49ce49f75ae8e982fc60372 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
var RowAlignment = {
STRETCH: "stretch",
LEFT: "left",
RIGHT: "right",
CENTER: "center",
}
/**
* Ratio of key height and font size.
* @type {number}
*/
var FONT_SIZE_RATIO = 2.5;
/**
* @type {enum}
* Possible layout alignments.
*/
var LayoutAlignment = {
CENTER: "center",
STRETCH: "stretch",
};
/**
* The enumerations of key sounds.
* @const
* @type {enum}
*/
var Sound = {
NONE: "none",
DEFAULT: "keypress-standard",
};
/**
* The enumeration of swipe directions.
* @const
* @type {Enum}
*/
var SwipeDirection = {
RIGHT: 0x1,
LEFT: 0x2,
UP: 0x4,
DOWN: 0x8
};
/**
* The default weight of a key in the X direction.
* @type {number}
*/
var DEFAULT_KEY_WEIGHT_X = 100;
/**
* The default weight of a key in the Y direction.
* @type {number}
*/
var DEFAULT_KEY_WEIGHT_Y = 70;
/**
* The top padding on each key.
* @type {number}
*/
// TODO(rsadam): Remove this variable once figure out how to calculate this
// number before the key is rendered.
var KEY_PADDING_TOP = 1;
var KEY_PADDING_BOTTOM = 1;
/**
* The default volume for keyboard sounds.
* @type {number}
*/
var DEFAULT_VOLUME = 0.3;
|