elementary / elementary/settings-keyboard

Some media keys cannot be re-assigned because Gnome Settings Daemon maps them statically

Open
#376 3 comments 2 reactions 0 assignees View on GitHub
Confirmed
Dominant language
Vala
Stars
31
Forks
23
PR merge metrics
No merged PRs in 30d

Description

## What Happened

I'm on a desktop computer with one external monitor. I have a keyboard that has brightness up/down keys. I want to assign these keys to a script that I made that send DDC commands to my monitor to change the brightness. This script works fine if I assign, for example, `ctrl` + `brightness up` and `ctrl` + `brightness down`, but not the `brightness up` and `brightness down` keys on their own. The script simply does not run.

![brightness](https://user-images.githubusercontent.com/12174852/129094500-b841de7d-1a51-4739-a2fc-f809fc04b3bc.png)

## Expected Behavior
I'd like to be able to assign my `brightness up` and `brightness down` keys to a custom script.

## Steps to Reproduce

To make it simple, let's assign a shortcut key to the command `notify-send Hello "This is a test"`:

- Open System Settings > Keyboard > Shortcuts > Custom
- Add a custom shortcut for `notify-send Hello "This is a test"` with shortcut key `MonBrightnessUp`.
- Press the Brightness Up key; the script does not run.
- Change the shortcut to `ctrl` + `MonBrightnessUp`
- Press `ctrl` + `MonBrightnessUp`; the script runs and we see the notification.

![brightness-reproduce](https://user-images.githubusercontent.com/12174852/129094524-28b19590-030a-401d-91bf-51849cf95a32.png)

### Logs

I don't have any logs for this.

## Platform Information

ElementaryOS 6 stable. This problem was also present in elementaryOS 5.1.7 that I was using previously.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.