diff --git a/MTMR/Assets.xcassets/ill_down.imageset/Contents.json b/MTMR/Assets.xcassets/ill_down.imageset/Contents.json new file mode 100644 index 0000000..9b00565 --- /dev/null +++ b/MTMR/Assets.xcassets/ill_down.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ill_down.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" + } +} \ No newline at end of file diff --git a/MTMR/Assets.xcassets/ill_down.imageset/ill_down.png b/MTMR/Assets.xcassets/ill_down.imageset/ill_down.png new file mode 100644 index 0000000..0d3a01e Binary files /dev/null and b/MTMR/Assets.xcassets/ill_down.imageset/ill_down.png differ diff --git a/MTMR/Assets.xcassets/ill_up.imageset/Contents.json b/MTMR/Assets.xcassets/ill_up.imageset/Contents.json new file mode 100644 index 0000000..3d34b88 --- /dev/null +++ b/MTMR/Assets.xcassets/ill_up.imageset/Contents.json @@ -0,0 +1,24 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "ill_up.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + }, + "properties" : { + "template-rendering-intent" : "template" + } +} \ No newline at end of file diff --git a/MTMR/Assets.xcassets/ill_up.imageset/ill_up.png b/MTMR/Assets.xcassets/ill_up.imageset/ill_up.png new file mode 100644 index 0000000..4639ae7 Binary files /dev/null and b/MTMR/Assets.xcassets/ill_up.imageset/ill_up.png differ diff --git a/MTMR/ItemsParsing.swift b/MTMR/ItemsParsing.swift index aaa1dc4..4147ff2 100644 --- a/MTMR/ItemsParsing.swift +++ b/MTMR/ItemsParsing.swift @@ -58,6 +58,16 @@ class SupportedTypesHolder { return (item: .staticButton(title: ""), action: .keyPress(keycode: 145), longAction: .none, parameters: [.image: imageParameter]) }, + "illuminationUp": { _ in + let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "ill_up")) + return (item: .staticButton(title: ""), action: .hidKey(keycode: NX_KEYTYPE_ILLUMINATION_UP), longAction: .none, parameters: [.image: imageParameter]) + }, + + "illuminationDown": { _ in + let imageParameter = GeneralParameter.image(source: #imageLiteral(resourceName: "ill_down")) + return (item: .staticButton(title: ""), action: .hidKey(keycode: NX_KEYTYPE_ILLUMINATION_DOWN), longAction: .none, parameters: [.image: imageParameter]) + }, + "volumeDown": { _ in let imageParameter = GeneralParameter.image(source: NSImage(named: .touchBarVolumeDownTemplate)!) return (item: .staticButton(title: ""), action: .hidKey(keycode: NX_KEYTYPE_SOUND_DOWN), longAction: .none, parameters: [.image: imageParameter]) diff --git a/README.md b/README.md index f112164..54bce1f 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ File for customize your preset for MTMR: `open ~/Library/Application\ Support/MT - exitTouchbar - brightnessUp - brightnessDown +- illuminationUp (keyboard illumination) +- illuminationDown (keyboard illumination) - volumeDown - volumeUp - mute