4

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.

4
  • 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, 2011 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, 2011 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, 2011 at 21:04
  • Corrections - the link is kbmon
    – new123456
    May 7, 2011 at 2:08

2 Answers 2

1

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.

0

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.

2
  • Can you add more detail? This is a very low quality answer Jul 3, 2013 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, 2013 at 18:15

You must log in to answer this question.

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