add brightness consumer keys

This commit is contained in:
xs5871 2022-07-14 12:01:54 +00:00 committed by Kyle Brown
parent 25a86df5c1
commit f46e3d59e6
3 changed files with 9 additions and 3 deletions

View File

@ -1,19 +1,21 @@
# Media Keys
Media keys extension adds keys for common media control keys. It can simply be
Media keys extension adds keys for common media control keys. It can simply be
added to the extensions list.
```python
from kmk.extensions.media_keys import MediaKeys
keyboard.extensions.append(MediaKeys())
```
## Keycodes
## Keycodes
|Key |Aliases |Description |
|-----------------------|--------------------|-----------------------------------------------|
|`KC.AUDIO_MUTE` |`KC.MUTE` |Mute |
|`KC.AUDIO_VOL_UP` |`KC.VOLU` |Volume Up |
|`KC.AUDIO_VOL_DOWN` |`KC.VOLD` |Volume Down |
|`KC.BRIGHTESS_UP` |`KC.BRIU` |Brightness Up |
|`KC.BRIGHTNESS_DOWN` |`KC.BRID` |Brightness Down |
|`KC.MEDIA_NEXT_TRACK` |`KC.MNXT` |Next Track (Windows) |
|`KC.MEDIA_PREV_TRACK` |`KC.MPRV` |Previous Track (Windows) |
|`KC.MEDIA_STOP` |`KC.MSTP` |Stop Track (Windows) |

View File

@ -15,6 +15,8 @@ keyboard.extensions.append(MediaKeys())
| `KC.AUDIO_MUTE` | `KC.MUTE` | Mudo |
| `KC.AUDIO_VOL_UP` | `KC.VOLU` | Aumenta o Volume |
| `KC.AUDIO_VOL_DOWN` | `KC.VOLD` | Aumenta o Volume |
| `KC.BRIGHTESS_UP` | `KC.BRIU` | Aumentar o brilho |
| `KC.BRIGHTNESS_DOWN` | `KC.BRID` | Diminuir o brilho |
| `KC.MEDIA_NEXT_TRACK` | `KC.MNXT` | Faixa Seguinte (Windows) |
| `KC.MEDIA_PREV_TRACK` | `KC.MPRV` | Faixa Anterior (Windows) |
| `KC.MEDIA_STOP` | `KC.MSTP` | Stop Faixa (Windows) |

View File

@ -17,6 +17,8 @@ class MediaKeys(Extension):
make_consumer_key(code=226, names=('AUDIO_MUTE', 'MUTE')) # 0xE2
make_consumer_key(code=233, names=('AUDIO_VOL_UP', 'VOLU')) # 0xE9
make_consumer_key(code=234, names=('AUDIO_VOL_DOWN', 'VOLD')) # 0xEA
make_consumer_key(code=111, names=('BRIGHTNESS_UP', 'BRIU')) # 0x6F
make_consumer_key(code=112, names=('BRIGHTNESS_DOWN', 'BRID')) # 0x70
make_consumer_key(code=181, names=('MEDIA_NEXT_TRACK', 'MNXT')) # 0xB5
make_consumer_key(code=182, names=('MEDIA_PREV_TRACK', 'MPRV')) # 0xB6
make_consumer_key(code=183, names=('MEDIA_STOP', 'MSTP')) # 0xB7