1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
13 * Ratio of key height and font size.
16 var FONT_SIZE_RATIO = 2.5;
20 * Possible layout alignments.
22 var LayoutAlignment = {
28 * The enumerations of key sounds.
34 DEFAULT: "keypress-standard",
38 * The enumeration of swipe directions.
42 var SwipeDirection = {
50 * The ratio between the width and height of the key when in portrait mode.
53 var KEY_ASPECT_RATIO_PORTRAIT = 1;
56 * The ratio between the width and height of the key when in landscape mode.
59 var KEY_ASPECT_RATIO_LANDSCAPE = 1.46;
62 * The ratio between the height and width of the compact keyboard.
65 var DEFAULT_KEYBOARD_ASPECT_RATIO = 0.41;
68 * The default weight of a key.
71 var DEFAULT_KEY_WEIGHT = 100;
74 * The default volume for keyboard sounds.
77 var DEFAULT_VOLUME = 0.2;
80 * The top padding on each key.
83 // TODO(rsadam): Remove this variable once figure out how to calculate this
84 // number before the key is rendered.
85 var KEY_PADDING_TOP = 1;
86 var KEY_PADDING_BOTTOM = 1;
89 * The greatest distance between a key and a touch point for a PointerEvent
93 var MAX_TOUCH_FUZZ_DISTANCE = 20;
96 * The maximum number of extra pixels before a resize is triggered.
99 var RESIZE_THRESHOLD = 20;
102 * The size of the pool to use for playing audio sounds on key press. This is to
103 * enable the same sound to be overlayed, for example, when a repeat key is
107 var SOUND_POOL_SIZE = 10;
110 * Whether or not to enable sounds on key press.
113 var SOUND_ENABLED = false;