Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been given one of these ubiquitous usb-sleep buttons which is basically a supersimple usb-keyboard. It's a big button that sends a SLEEP keypress to the computer when you slam it. But that is pretty boring. I'd love to remap it to do something more fun but I can't figure out how to bind to only the sleep press from the button and not from my ordinary keyboard.

The button identifies as

Bus 001 Device 035: ID 1130:600d Tenx Technology, Inc. 

I'd like to know if there's either

  1. a way of mapping a key from a specific keyboard to an action OR

  2. a way of remapping the sleep key from a specific keyboard to a new key-code or something like that.

share|improve this question
You could use your WM to program keypresses like this. And I hate to plug my own work (it is in disrepair right now), but kbmon may help you out. – new123456 May 4 '11 at 11:04
Problem is my WM doesn't seem to allow for separate configurations for different simultaneous keyboards. I'd like to bind my "magic button" without messing up the sleep button on my main keyboard. – Liminal May 6 '11 at 14:52
In that case, you will certainly need a separate keyboard binder that recognizes multiple keyboards. You can probably find them around, but the one I know best is my own.. (Not that I'd recommend it if you can find another, but mine works for what you suggest). – new123456 May 6 '11 at 21:04
Corrections - the link is kbmon – new123456 May 7 '11 at 2:08

Are you able to see the key code in xev? Run xev in terminal and see if pressing it gives you the keycode. If so, you may be able to set a xmodmap rule for it.

share|improve this answer

You can also use showkey command as root if xev doesn't work for you. Sometimes you need to use showkey command if xev command doesn't produce any usable output. Just start showkey command as root.

share|improve this answer
Can you add more detail? This is a very low quality answer – Canadian Luke Jul 3 '13 at 18:54
The question was asked 2 years ago. I don't even have the button left and the question was not about how to identify the key but how to remap the button without affecting my main keyboard. – Liminal Jul 10 '13 at 18:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .