How to find out what action or command or script is assigned to a hardware button

gnomekeyboard shortcuts

I'm trying to assign a correct rotation on my tablet. https://superuser.com/questions/340516/assigning-a-rotation-script-to-a-hardware-button

One way to do this is using gnome keyboard shortcuts. However, there is an action that is already assigned to that button. I'd like to remove that action but I'm not sure how to change the key binding. When I add a key binding in gnome, it just adds another action to the button instead of replacing it.

Best Answer

It depends which desktop environment you use. The answer that follows is pertaining to Gnome.

GConf is your friend. The actions that are stored for button shortcuts are defined in the gconf configuration database. Two ways for doing so:

  1. gconf-editor and then search for 'bindings'. you can here unset the action-button binding;
  2. Either search in $HOME/.gconf/ or /etc/gconf/schemas (if you are root) for the name of the button that you are looking for, and modify the assigned button.

It can remove existing actions with this.

Related Question