Report question

Question: How can I get the keyboard state in Linux?