-
Notifications
You must be signed in to change notification settings - Fork 17
/
index.js
41 lines (35 loc) · 1.02 KB
/
index.js
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
'use strict';
// Many moonstone controls require ilib components but do not directly require the base module which
// is necessary to include the locale assets.
require('enyo-ilib');
var
platform = require('enyo/platform'),
dispatcher = require('enyo/dispatcher'),
gesture = require('enyo/gesture');
exports = module.exports = require('./src/options');
exports.version = '2.7.0';
// Override the default holdpulse config to account for greater delays between keydown and keyup
// events in Moonstone with certain input devices.
gesture.drag.configureHoldPulse({
events: [{name: 'hold', time: 400}],
endHold: 'onLeave'
});
/**
* Registers key mappings for webOS-specific device keys related to media control.
*
* @private
*/
if (platform.webos >= 4) {
// Table of default keyCode mappings for webOS device
dispatcher.registerKeyMap({
415 : 'play',
413 : 'stop',
19 : 'pause',
412 : 'rewind',
417 : 'fastforward',
461 : 'back'
});
}
// ensure that these are registered
require('./src/resolution');
require('./src/fonts');