I have a Bluetooth "Camera Shutter" dongle. It emulates a Bluetooth keyboard. I've paired successfully, but I want to change how the buttons behave.
Currently, they're mapped to 123
(Volume Up) and 36
(Enter).
I'd like to change their mappings - but only for this Bluetooth keyboard. I want my laptop's keyboard to be unaffected.
My end goal is to have a Python program run when one of the keys is pressed.
Some things I found which didn't work:
- I don't want to change the language of the external keyboard using
setxkbmap
. - Using
xkb
seems to remap keys on all keyboards. xinput
can remap mouse buttons but not keyboard keys.
I want to press "Volume Up" on my external keyboard and have a command run - without interfering with my internal keyboard's "Volume Up" key.
Any ideas? Ubuntu 14.04.4 LTS. Thanks.
As per https://superuser.com/a/869064/140864 - it's possible to use
xkbcomp
to change the assignment of specific keys.This needs to be run every time the device is connected. The keys can then be assigned to a specific shortcut action in Gnome.