From 2bf6b90b04e1d693c620c83ab6eac43d2fbbe52e Mon Sep 17 00:00:00 2001 From: ad Date: Mon, 30 Apr 2018 10:11:22 +0300 Subject: [PATCH] * fix for brightness --- MTMR/ItemsParsing.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/MTMR/ItemsParsing.swift b/MTMR/ItemsParsing.swift index bd56385..60699cd 100644 --- a/MTMR/ItemsParsing.swift +++ b/MTMR/ItemsParsing.swift @@ -78,8 +78,8 @@ class SupportedTypesHolder { let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessUp")) return ( item: .staticButton(title: ""), - action: .keyPress(keycode: 113), - tapAction: TapAction(actionType: TapActionType.keyPress, keycode: 113), + action: .hidKey(keycode: Int(NX_KEYTYPE_BRIGHTNESS_UP)), + tapAction: TapAction(actionType: TapActionType.hidKey, keycode: Int(NX_KEYTYPE_BRIGHTNESS_UP)), longTapAction: LongTapAction(actionType: TapActionType.none), parameters: [.image: imageParameter] ) @@ -88,8 +88,8 @@ class SupportedTypesHolder { let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "brightnessDown")) return ( item: .staticButton(title: ""), - action: .keyPress(keycode: 107), - tapAction: TapAction(actionType: TapActionType.keyPress, keycode: 107), + action: .hidKey(keycode: Int(NX_KEYTYPE_BRIGHTNESS_DOWN)), + tapAction: TapAction(actionType: TapActionType.hidKey, keycode: Int(NX_KEYTYPE_BRIGHTNESS_DOWN)), longTapAction: LongTapAction(actionType: TapActionType.none), parameters: [.image: imageParameter] )