Using thinkpad keys in Emacs for windows

View: New views
6 Messages — Rating Filter:   Alert me  

Using thinkpad keys in Emacs for windows

by Amnon Harel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Using thinkpad keys in Emacs for windows

Hello,

I've just started using Emacs for windows on my thinkpad
(Lenovo laptop, formerly IBM). I'd like to map the thinkpad
"browser forward" and "browser back" keys to useful emacs
commands.
This actually works for my in Linux (Ubuntu, running under
virtual box) - I could identify the keys with xev, map
them in my .Xmodmap:
    keycode 233 = F21
    keycode 234 = F22
and then use them in emacs as usual.

I've tried the XKeymacs utility, which when I played with
the config GUI, cause emacs to realize the browser button
was pressed. But it did not let me map this to a key press
(I think), so I'm not sure whether it can do the job.
Also not sure how to have it active on all emacs windows
and no others. A usage almost the exact opposite of that
intended by the author :-)

Any suggestion?
In particular, how can I tell whether emacs for windows notices a key
was pressed (like xev does in linux)?

 Thanks,
 Amnon


Parent Message unknown Re: Using thinkpad keys in Emacs for windows

by John A Pershing Jr :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Amnon Harel wrote:
>
> In particular, how can I tell whether emacs for windows notices a key
> was pressed (like xev does in linux)?

Easiest way is to type: C-H K and then press the key that you are
interested in.  On my Windows system, the page-forward and page-back
keys appear to be dead to Emacs.

  -jp




RE: Using thinkpad keys in Emacs for windows

by Amnon Harel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

RE: [h-e-w] Using thinkpad keys in Emacs for windows

Thanks John.

It's the same on my laptop - emacs can't see them out of the box.

Anyone have an idea how to make emacs aware of these
key presses as key presses?
(or a way to configure XKeymacs to arbitrary commands
 only for emacs)

 Cheers,
 Amnon





Re: Using thinkpad keys in Emacs for windows

by Kenneth Goldman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

My T60p doesn't have page-forward, but it does have "PgUp" and "PgDn".

They map to "prior" and "next" and I map them as (e.g.)

(global-set-key [prior] 'scroll-one-line-down)
(global-set-key [M-prior] 'scroll-other-window-one-line-down)
(global-set-key [S-prior] 'scroll-down)
(global-set-key [C-prior] 'beginning-of-buffer)

They work equally well with an external keyboard, and both work
for Linux and Windows.

help-emacs-windows-bounces+kgold=watson.ibm.com@... wrote on 07/09/2009 08:53:38 AM:

> Amnon Harel wrote:
> >
> > In particular, how can I tell whether emacs for windows notices a key
> > was pressed (like xev does in linux)?
>
> Easiest way is to type: C-H K and then press the key that you are
> interested in.  On my Windows system, the page-forward and page-back
> keys appear to be dead to Emacs.


RE: Using thinkpad keys in Emacs for windows

by Amnon Harel :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

RE: [h-e-w] Using thinkpad keys in Emacs for windows

Hi Kenneth,

I apologize for not being explicit enough.
It's a Thinkpad T500, and I'm talking about the keys on both
sides of the up arrow key. They complete the 4 arrow keys
into a 2*3 pattern, and are available on most thinkpads.

Page up and Page down have a very useful and natural
use already, so I don't want to change it.

 Thanks,
 Amnon



-----Original Message-----
From: help-emacs-windows-bounces+amnon.harel=cern.ch@... on behalf of Kenneth Goldman
Sent: Thu 09-Jul-09 7:06 AM
Cc: help-emacs-windows@...
Subject: Re: [h-e-w] Using thinkpad keys in Emacs for windows

My T60p doesn't have page-forward, but it does have "PgUp" and "PgDn".

They map to "prior" and "next" and I map them as (e.g.)

(global-set-key [prior]      'scroll-one-line-down)
(global-set-key [M-prior]    'scroll-other-window-one-line-down)
(global-set-key [S-prior]    'scroll-down)
(global-set-key [C-prior]    'beginning-of-buffer)

They work equally well with an external keyboard, and both work
for Linux and Windows.

help-emacs-windows-bounces+kgold=watson.ibm.com@... wrote on 07/09/2009
08:53:38 AM:

> Amnon Harel wrote:
> >
> > In particular, how can I tell whether emacs for windows notices a key
> > was pressed (like xev does in linux)?
>
> Easiest way is to type: C-H K and then press the key that you are
> interested in.  On my Windows system, the page-forward and page-back
> keys appear to be dead to Emacs.


Re: Using thinkpad keys in Emacs for windows

by Jason Rumney-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Kenneth Goldman wrote:
>
> My T60p doesn't have page-forward, but it does have "PgUp" and "PgDn".
>
> They map to "prior" and "next" and I map them as (e.g.)
>

Those are standard keys, available on any keyboard.

Emacs 23 users can try

    (setq w32-pass-multimedia-buttons-to-system nil)

and see if it affects the extra keys you are interested in.