How to monitor (ACPI?) events and keypresses in linux?

3

1

I'm using Arch Linux (Ubuntu or Gentoo are also available) I'd like to configure my Dell Latitude XT Tablet to my liking. I need to know/handle all events that are forwarded to OS. There are several buttons on the lid but one is not recognized by the OS/DE* (the one with the wrench). There is also a jog and a button on the side of the lid and these are accesible only after the lid is closed. Unfortunatelly the button and one position of the jog is not recognized the other position and jog-click are duplicating other buttons which I don't want. I'd also would like to know not only when the lid is closed but also when the lid has been turned and closed in the tablet position. I'd also like to handle the pressing of WiFi Catcher button. I'm also interested if pulling the pen out generates any events (it surely makes the dedicated LED blink).

If there's a way to read the events/keystrokes with Python, I'm even more interested.

So to sum my quiestion up: How do I debug all events and keystrokes? acpi_listen doesn't show what I need. Python solution is preferable.

*DE = Desktop Environment

minder

Posted 2012-08-17T10:20:52.783

Reputation: 197

1does xev detect them? – Journeyman Geek – 2012-08-17T10:24:10.240

xev detects some of the buttons: the one with the wrench (so there's a progress), clicking of jog and pushing jog in one direction). button next to jog is not detected. clicking WiFi Catcher or turning the lid to tablet mode is also not detected by xev.

EDIT: jog-click and one of the lid buttons (for turning screen) are treated as the same button :( – minder – 2012-08-17T10:39:51.163

Answers

4

A few tools that would help here - xev and evtest will help detect events - they use different methods, so try both. You might then be able to bind these with xbindkeys to various events.

Journeyman Geek

Posted 2012-08-17T10:20:52.783

Reputation: 119 122