Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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 have a ThinkPad W540. On its keyboard there are four multimedia keys above the numpad. Two of those keys generate keycodes (and, apparently, scancodes) that correspond to combination of keys, Win_L + L and Win_L + E. In other words, for the key that generates Win_L + L,
showkey --scancodes returns this:

0xe0 0x5b 0x26 0xa6 0xe0 0xdb

The setkeycodes command requires either single byte unescaped or escaped two-byte sequences to denote scan codes, and showkey gives me way more than that, so I can't quite re-map that key to one of the free keycodes in my system with a straightforward "setkeycodes ".

After few hours of googling I'm still at loss as to how I can remap that key to something else that doesn't simply duplicate one of the existing key combinations on my keyboard and I would really appreciate any hints on how I can achieve that.

share|improve this question
    
You might want to have a look at this: Shortcut keys that are independent to keyboard layout – terdon Feb 6 '14 at 21:04
    
I think this may be tricky: at least on older Thinkpads, this sort of mapping is done by the on-board controller, not the OS. – mirabilos Feb 27 '14 at 21:34
    
I have a Microsoft All-in-One Media Keyboard which has the same problem, were you able to find a solution? – hos Apr 20 '15 at 22:35
    
Unfortunately, no. The best I could do was to map those key combinations to some other actions. – moonwalker May 23 '15 at 22:06
2  
I did something similar on a Thinkpad t61 a while ago by mapping the keys using /etc/acpi/events which is in the acpid package and just defining an action when those function keys were pressed. – cesar Jan 15 at 20:29

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.