Started to implement keycodes service.

This commit is contained in:
Gunther Brunner
2014-05-27 18:35:50 +09:00
parent daa7677218
commit 6526724695
9 changed files with 446 additions and 2 deletions

View File

@@ -1,3 +1,12 @@
module.exports = function InputCtrl($scope) {
module.exports = function InputCtrl($scope, KeycodesAndroid) {
$scope.press = function (key) {
console.log(key)
var mapped = KeycodesAndroid[key]
if (mapped) {
$scope.control.rawKeyPress(mapped)
} else {
console.error(key + ' is not mapped')
}
}
}