Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Welcome to the Power Users community on Codidact!

Power Users is a Q&A site for questions about the usage of computer software and hardware. We are still a small site and would like to grow, so please consider joining our community. We are looking forward to your questions and answers; they are the building blocks of a repository of knowledge we are building together.

Post History

75%
+4 −0
Q&A Programmatically changing the keyboard illumination in small steps

Background story: I would like to have a button in my touch bar which changes the illumination of the keyboard in small steps (what you normally get from pressing Illumination(up/down)+option+shif...

1 answer  ·  posted 2y ago by samcarter‭  ·  last activity 1y ago by samcarter‭

Question macos11
#3: Post edited by user avatar samcarter‭ · 2022-01-07T08:59:32Z (about 2 years ago)
  • Background story:
  • I would like to have a button in my touch bar which changes the illumination of the keyboard in small steps (what you normally get from pressing `Illumination(up/down)`+`option`+`shift`).
  • To do this I'm currently trying to use [MTMR (My touchbar. My rules.)](https://github.com/Toxblh/MTMR), which allows me to create my own buttons, which then can run shell scripts, apple scripts, etc.
  • ---
  • For the screen brightness I can easily get my desired behaviour by this apple script:
  • ```
  • tell application \"System Events\" to key code 107 using {option down, shift down}
  • ```
  • However for the illumination key, there does not seem to be a key code which I can use in the apple script. Is there any other way to change the keyboard illumination programmatically?
  • *(If possible, I would like to use open source tools and avoid commercial software like BetterTouchTools)*
  • Background story:
  • I would like to have a button in my touch bar which changes the illumination of the keyboard in small steps (what you normally get from pressing `Illumination(up/down)`+`option`+`shift`).
  • To do this I'm currently trying to use [MTMR (My touchbar. My rules.)](https://github.com/Toxblh/MTMR), which allows me to create my own buttons, which then can run shell scripts, apple scripts, etc.
  • ---
  • For the screen brightness I can easily get my desired behaviour by this apple script:
  • ```
  • tell application "System Events" to key code 107 using {option down, shift down}
  • ```
  • However for the illumination key, there does not seem to be a key code which I can use in the apple script. Is there any other way to change the keyboard illumination programmatically?
  • *(If possible, I would like to use open source tools and avoid commercial software like BetterTouchTools)*
#2: Post edited by user avatar samcarter‭ · 2022-01-06T19:46:26Z (about 2 years ago)
#1: Initial revision by user avatar samcarter‭ · 2022-01-06T19:31:53Z (about 2 years ago)
Programmatically changing the keyboard illumination in small steps
Background story:

I would like to have a button in my touch bar which changes the illumination of the keyboard in small steps (what you normally get from pressing `Illumination(up/down)`+`option`+`shift`).

To do this I'm currently trying to use [MTMR (My touchbar. My rules.)](https://github.com/Toxblh/MTMR), which allows me to create my own buttons, which then can run shell scripts, apple scripts, etc.

---

For the screen brightness I can easily get my desired behaviour by this apple script:

```
tell application \"System Events\" to key code 107 using {option down, shift down}
```

However for the illumination key, there does not seem to be a key code which I can use in the apple script. Is there any other way to change the keyboard illumination programmatically?

*(If possible, I would like to use open source tools and avoid commercial software like BetterTouchTools)*