You can map some keyboards button (or button of a board, or any specific button from a controller) to specific actions on your system, like muting the sound or shutting down.

Default multimedia keys mapping is configured in one file here : /etc/triggerhappy/triggers.d.

There are several files, depending on your board, but only one is used at once.

It is generally multimedia_keys.conf, but on some boards like odroid go advance or super, there is a specific file, mainly to manage the extra actions.

If you want to customize hotkeys, just create a file in your data here :

/userdata/system/configs/multimedia_keys.conf

It can be empty, but in this case, it will do nothing. The best is to start for the current config and modifiying it.

So, for example on odroid go super, to copy the current configuration and modify it, for example to enable suspend mode,

  • copy /etc/triggerhappy/triggers.d/multimedia_keys_Hardkernel_ODROID_GO3.conf to /userdata/system/configs/multimedia_keys.conf
  • then modify the line :
KEY_POWER       1               /sbin/shutdown -h now

by

KEY_POWER       1               /usr/sbin/pm-suspend
  • reboot.

How to guess which value correspond to which button ?

Easy.

  • Run in a terminal the command :
evtest
  • choose your controller
  • press the button
Event: time 1614795871.549381, type 1 (EV_KEY), code 99 (KEY_SYSRQ), value 0
  • In this example, the button i pressed on my keyboard was : KEY_SYSRQ
  • customize_hotkeys.txt
  • Last modified: 6 weeks ago
  • by nadenislamarre