How do I remap keycodes for specific software?

How do I remap keycodes for specific software?

Post by Andrew P. Billyar » Wed, 18 Jun 2003 17:21:29



Hi All,

I've recently come upon an interesting problem using the software Maple on
my AMD K6-2/500 running Redhat 8.0 (2.4.20-13.8), with Window Maker 0.80.1
as my window manager.  When using Maple in GUI
mode in X, the Up, Down, Left and Right arrow keys do *nothing*, but the
keypad equivalents do, so I simply re-mapped those keys.  For example,

xmodmap -e "keycode 98 = KP_Up"

and this works.  Unfortunately, it screws up my wheelmouse (scrolling the
wheel up and down will no longer scroll a web page up and down inside a
browser (I'm using imwheel).  So I wrote a little script which toggles
between the two values for the arrows keys.  

This is fine, but I was wondering if there is a more elegant way to remap
these keys *just* for Maple without having to run scripts before and after
the program.

Any suggestions are welcome.

Cheers,
Andrew

 
 
 

How do I remap keycodes for specific software?

Post by Dances With Crow » Wed, 18 Jun 2003 23:20:54


On Tue, 17 Jun 2003 08:21:29 GMT, Andrew P. Billyard staggered into the
Black Sun and said:

Quote:> When using Maple in GUI mode in X, the Up, Down, Left and Right arrow
> keys do *nothing*, but the keypad equivalents do, so I simply
> re-mapped those keys.  For example,
> xmodmap -e "keycode 98 = KP_Up"

> and this works.  Unfortunately, it screws up my wheelmouse (scrolling
> the wheel up and down will no longer scroll a web page up and down
> inside a browser (I'm using imwheel)

So don't use imwheel.  It should not be necessary now that X and the
most frequently-used widget sets (Qt, GTK+, and Mozilla's) all have
native support for mousewheel events and have had that for years.
imwheel was, at best, a stopgap solution, and it's time to retire it
unless you made use of its advanced features.

Quote:> So I wrote a little script which toggles between the two values for
> the arrows keys.  This is fine, but I was wondering if there is a more
> elegant way to remap these keys *just* for Maple without having to run
> scripts before and after the program.

If Maple itself allows you to remap keys, that'd be the easiest way to
do it.  If it doesn't, I think you're stuck.  

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /
http://www.brainbench.com     /  "He is a rhythmic movement of the
-----------------------------/    penguins, is Tux." --MegaHAL

 
 
 

How do I remap keycodes for specific software?

Post by Andrew P. Billyar » Thu, 19 Jun 2003 18:07:56


Okay...thanks for the help.

> Path:
>    ursa-nb00s0.nbnet.nb.ca!nf3.bellglobal.com!fu-berlin.de!uni-berlin.de!12-24
>    5-221-204.client.attbi.COM!not-for-mail

> Newsgroups: comp.os.linux.x
> Subject: Re: How do I remap keycodes for specific software?
> Date: 17 Jun 2003 14:20:54 GMT
> Lines: 30



> NNTP-Posting-Host: 12-245-221-204.client.attbi.com (12.245.221.204)
> X-Trace: fu-berlin.de 1055859654 21703595 12.245.221.204 (16 [41327])
> User-Agent: slrn/0.9.7.4 (Linux)
> Xref: ursa-nb00s0.nbnet.nb.ca comp.os.linux.x:20591
> MIME-Version: 1.0
> Content-Type: text/plain

> On Tue, 17 Jun 2003 08:21:29 GMT, Andrew P. Billyard staggered into the
> Black Sun and said:
>> When using Maple in GUI mode in X, the Up, Down, Left and Right arrow
>> keys do *nothing*, but the keypad equivalents do, so I simply
>> re-mapped those keys.  For example,
>> xmodmap -e "keycode 98 = KP_Up"

>> and this works.  Unfortunately, it screws up my wheelmouse (scrolling
>> the wheel up and down will no longer scroll a web page up and down
>> inside a browser (I'm using imwheel)

> So don't use imwheel.  It should not be necessary now that X and the
> most frequently-used widget sets (Qt, GTK+, and Mozilla's) all have
> native support for mousewheel events and have had that for years.
> imwheel was, at best, a stopgap solution, and it's time to retire it
> unless you made use of its advanced features.

>> So I wrote a little script which toggles between the two values for
>> the arrows keys.  This is fine, but I was wondering if there is a more
>> elegant way to remap these keys *just* for Maple without having to run
>> scripts before and after the program.

> If Maple itself allows you to remap keys, that'd be the easiest way to
> do it.  If it doesn't, I think you're stuck.

 
 
 

1. How do I remap keycodes for specific software?

Hi All,

I've recently come upon an interesting problem using the software Maple on
my AMD K6-2/500 running Redhat 8.0 (2.4.20-13.8), with Window Maker 0.80.1
as my window manager.  When using Maple in GUI
mode in X, the Up, Down, Left and Right arrow keys do *nothing*, but the
keypad equivalents do, so I simply re-mapped those keys.  For example,

xmodmap -e "keycode 98 = KP_Up"

and this works.  Unfortunately, it screws up my wheelmouse (scrolling the
wheel up and down will no longer scroll a web page up and down inside a
browser (I'm using imwheel).  So I wrote a little script which toggles
between the two values for the arrows keys.  

This is fine, but I was wondering if there is a more elegant way to remap
these keys *just* for Maple without having to run scripts before and after
the program.

Any suggestions are welcome.

Cheers,
Andrew

2. Single character input via serial port

3. keycodes remapping under X

4. PCI Video Card with TV Out for Mandrake 9.0

5. Problem changing autorepeat for specific keycodes

6. Intel, Cyrix or AMD?

7. Q: Preventing linux from remapping a specific address?

8. Is there an IDE for FreeBSD?

9. Remapping of keyboard & linux software map (lsm)

10. specific software ?

11. Software for specific UNIXes on Linux?

12. where to find software that is not pentium specific

13. host-specific <-> network-specific routing precedence