<p>Is it possible to listen for a certain hotkey (e.g:<kbd>Ctrl</kbd><kbd>-</kbd><kbd>I</kbd>) and then perform a specific action? My application is written in C, will only run on Linux, and it doesn't have a GUI. Are there any libraries that help with this kind of task?</p>

<p>EDIT: as an example, amarok has global shortcuts, so for example if you map a combination of keys to an action (let's say <kbd>Ctrl</kbd><kbd>-</kbd><kbd>+</kbd>, <kbd>Ctrl</kbd> and <kbd>+</kbd>) you could execute that action when you press the keys. If I would map <kbd>Ctrl</kbd><kbd>-</kbd><kbd>+</kbd> to the volume increase action, each time I press <kbd>ctrl</kbd><kbd>-</kbd><kbd>+</kbd> the volume should increase by a certain amount.</p>

<p>Thanks</p>

How global do your hotkeys need to be?  Is it enough for them to be global for a X session?  In that case you should be able to open an Xlib connection and listen for the events you need.
Ordinarily keyboard events in X are delivered to the window that currently has the focus, and propagated up the hierarchy until they are handled.  Clearly this is not what we want.  We need to process the event before any other window can get to it.  We need to call
XGrabKey
on the root window with the keycode and  modifiers of our hotkey to accomplish this.
I found a good example
here
.