mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-18 16:13:24 +02:00
Started to implement keycodes service.
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user