Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.