mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 08:33:24 +02:00
Added back Advanced Input.
This commit is contained in:
@@ -1,12 +1,6 @@
|
||||
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')
|
||||
}
|
||||
$scope.control.keyPress(key)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,37 +6,37 @@
|
||||
div
|
||||
h6(translate) Special Keys
|
||||
div.special-keys-buttons
|
||||
button(title='Power', ng-click='press("KEYCODE_POWER")').btn.btn-danger
|
||||
button(title='Power', ng-click='press("power")').btn.btn-danger
|
||||
i.fa.fa-power-off
|
||||
button(title='Camera', ng-click='press("KEYCODE_CAMERA")').btn.btn-primary
|
||||
button(title='Camera', ng-click='press("camera")').btn.btn-primary
|
||||
i.fa.fa-camera
|
||||
button(title='Switch Charset', ng-click='press("KEYCODE_SWITCH_CHARSET")').btn.btn-primary.btn-info
|
||||
button(title='Switch Charset', ng-click='press("switch_charset")').btn.btn-primary.btn-info
|
||||
i.fa Aa
|
||||
button(title='Search', ng-click='press("KEYCODE_SEARCH")').btn.btn-primary
|
||||
button(title='Search', ng-click='press("search")').btn.btn-primary
|
||||
i.fa.fa-search
|
||||
|
||||
h6(translate) Volume
|
||||
.btn-group
|
||||
button(title='Mute', ng-click='press("KEYCODE_MUTE")').btn.btn-primary.btn-xs
|
||||
button(title='Mute', ng-click='press("mute")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-volume-off
|
||||
button(title='Volume Down', ng-click='press("KEYCODE_VOLUME_DOWN")').btn.btn-primary.btn-xs
|
||||
button(title='Volume Down', ng-click='press("volume_down")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-volume-down
|
||||
button(title='Volume Up', ng-click='press("KEYCODE_VOLUME_UP")').btn.btn-primary.btn-xs
|
||||
button(title='Volume Up', ng-click='press("volume_up")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-volume-up
|
||||
|
||||
h6(translate) Media
|
||||
.btn-group
|
||||
button(title='Rewind', ng-click='press("KEYCODE_MEDIA_REWIND")').btn.btn-primary.btn-xs
|
||||
button(title='Rewind', ng-click='press("media_rewind")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-fast-backward
|
||||
button(title='Previous', ng-click='press("KEYCODE_MEDIA_PREVIOUS")').btn.btn-primary.btn-xs
|
||||
button(title='Previous', ng-click='press("media_previous")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-step-backward
|
||||
button(title='Play/Pause', ng-click='press("KEYCODE_MEDIA_PLAY_PAUSE")').btn.btn-primary.btn-xs
|
||||
button(title='Play/Pause', ng-click='press("media_play_pause")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-youtube-play
|
||||
button(title='Stop', ng-click='press("KEYCODE_MEDIA_STOP")').btn.btn-primary.btn-xs
|
||||
button(title='Stop', ng-click='press("media_stop")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-stop
|
||||
button(title='Next', ng-click='press("KEYCODE_MEDIA_NEXT")').btn.btn-primary.btn-xs
|
||||
button(title='Next', ng-click='press("media_next")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-step-forward
|
||||
button(title='Fast Forward', ng-click='press("KEYCODE_MEDIA_FAST_FORWARD")').btn.btn-primary.btn-xs
|
||||
button(title='Fast Forward', ng-click='press("media_fast_forward")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-fast-forward
|
||||
//h6 Physical Media
|
||||
//.btn-group
|
||||
@@ -50,8 +50,8 @@
|
||||
i.fa.fa-eject
|
||||
button(title='Record', ng-click='press("KEYCODE_MEDIA_RECORD")').btn.btn-primary.btn-xs
|
||||
i.fa.fa-circle
|
||||
h6(translate) Other Keys
|
||||
div.special-other-keys-buttons
|
||||
//h6(translate) Other Keys
|
||||
//div.special-other-keys-buttons
|
||||
button(ng-click='press("KEYCODE_APP_SWITCH")').btn.btn-default.btn-xs
|
||||
i.fa App Switch
|
||||
button(ng-click='press("KEYCODE_MANNER_MODE")').btn.btn-default.btn-xs
|
||||
@@ -93,22 +93,22 @@
|
||||
tr
|
||||
td
|
||||
td
|
||||
button(title='D-pad Up', ng-click='press("KEYCODE_DPAD_UP")').btn.btn-info.btn-xs
|
||||
button(title='D-pad Up', ng-click='press("dpad_up")').btn.btn-info.btn-xs
|
||||
i.fa.fa-chevron-up
|
||||
td
|
||||
tr
|
||||
td
|
||||
button(title='D-pad Left', ng-click='press("KEYCODE_DPAD_LEFT")').btn.btn-info.btn-xs
|
||||
button(title='D-pad Left', ng-click='press("dpad_left")').btn.btn-info.btn-xs
|
||||
i.fa.fa-chevron-left
|
||||
td
|
||||
button(title='D-pad Center', ng-click='press("KEYCODE_DPAD_CENTER")').btn.btn-info.btn-xs
|
||||
button(title='D-pad Center', ng-click='press("dpad_center")').btn.btn-info.btn-xs
|
||||
i.fa.fa-circle-o
|
||||
td
|
||||
button(title='D-pad Right', ng-click='press("KEYCODE_DPAD_RIGHT")').btn.btn-info.btn-xs
|
||||
button(title='D-pad Right', ng-click='press("dpad_right")').btn.btn-info.btn-xs
|
||||
i.fa.fa-chevron-right
|
||||
tr
|
||||
td
|
||||
td
|
||||
button(title='D-pad Down', ng-click='press("KEYCODE_DPAD_DOWN")').btn.btn-info.btn-xs
|
||||
button(title='D-pad Down', ng-click='press("dpad_down")').btn.btn-info.btn-xs
|
||||
i.fa.fa-chevron-down
|
||||
td
|
||||
td
|
||||
|
||||
Reference in New Issue
Block a user