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.

In Emacs 24 in Windows, the "previous buffer" and "next buffer" keys are unhelpfully bound to "XF86Back" and "XF86Forward" which is a bit nonsensical in Windows.

On my Lenovo x220 there are "browser go back" and "browser go forwards" buttons that I'd like to remap. They don't get seen by emacs when I try to use global-set-key though.

If I know the scancode of a key, how can I use it in Emacs?

share|improve this question
1  
Try C-h c and then the key you want to bind. If Emacs actually sees the key, that will tell you what it's called. –  legoscia Jun 24 '13 at 11:33
    
The button doesn't produce anything that emacs can see. –  Piku Jun 24 '13 at 21:56
    
In that case, you are out of luck. Emacs needs to see the key in order to do something with it. Try using some other keys (that Emacs does see). –  Drew Sep 1 '13 at 19:54

1 Answer 1

Have you tried

(setq w32-pass-multimedia-buttons-to-system nil)
(global-set-key (kbd "<browser-forward>") 'next-buffer)
(global-set-key (kbd "<browser-back>") 'previous-buffer)

in your .emacs? Works on linux on my x220

share|improve this answer

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.