Merge pull request #12594 from MSOpenTech/v3-winrt-js-keyboard

V3 winrt js keyboard support
This commit is contained in:
pandamicro 2015-06-30 07:24:17 +08:00
commit 92c869f408
1 changed files with 4 additions and 1 deletions

View File

@ -1477,12 +1477,15 @@ cc._initSys = function(config, CONFIG_KEY){
if( locSys.isMobile ) {
capabilities["accelerometer"] = true;
capabilities["touches"] = true;
if (platform === locSys.WINRT || platform === locSys.WP8) {
capabilities["keyboard"] = true;
}
} else {
// desktop
capabilities["keyboard"] = true;
capabilities["mouse"] = true;
// winrt can't suppot mouse in current version
if (platform === locSys.WINRT)
if (platform === locSys.WINRT || platform === locSys.WP8)
{
capabilities["touches"] = true;
capabilities["mouse"] = false;