You are not logged in.

#1 2008-01-20 11:52:21

mikoro
Member
From: Espoo, Finland
Registered: 2007-03-27
Posts: 20
Website

Map multimedia keys to characters?

I've got five multimedia keys on the edge of my keyboard and they are aligned just properly to be used as input in Frets On Fire smile Game doesn't recognize those keys though, so I was wondering is there a way to make the multimedia keys to generate for example characters a, b, c, d and e? Then they should work in the game?

Offline

#2 2008-01-20 12:09:16

May-C
Member
Registered: 2007-12-28
Posts: 83

Re: Map multimedia keys to characters?

With xmodmap this should be possible. There is a lot of information in the web...
A start would be:

man xmodmap

I think this works also in games but I am not 100% sure about it.

Offline

#3 2008-01-20 12:11:38

Gilneas
Member
From: Netherlands
Registered: 2006-10-22
Posts: 320

Re: Map multimedia keys to characters?

Use xev to find out the keycode of the multimedia keys and the keysym of the characters (it uses these names in the output too, so it's very convenient)

xmodmap -e "keycode [insert_mm_keycode] = [insert_char_keysym]"

And put it in .xinitrc too.

Offline

#4 2008-01-20 12:23:19

mikoro
Member
From: Espoo, Finland
Registered: 2007-03-27
Posts: 20
Website

Re: Map multimedia keys to characters?

Ok, thanks I got all them but one working. Four of these keys return keycodes: 129, 144, 153 and 162. They are also recognized by xev. But one of them doesn't print anything in xev. I tried with "showkey -k" and it told me that the keycode is 410. Even though I mapped that keycode with xmodmap it doesn't print anything. All the other multimedia keys now print characters. What's the problem?

edit: It seems that xorg doesn't like keycodes above 255. So I have to somehow map that one button to generate keycode below 255. I could probably do it with setkeycodes? Problem is that I've got no idea what the scan code of that button is, because it doesn't show up anywhere. "showkey -k" shows 410 and "showkey -s" shows nothing (for other key it shows the scan code normally). Weird...

Last edited by mikoro (2008-01-20 13:34:27)

Offline

#5 2008-01-20 19:01:59

Zer0
Member
From: Windsor, ON, Canada
Registered: 2006-08-25
Posts: 299

Re: Map multimedia keys to characters?

I think keytouch will help you where scancodes fail as it's supposed to get the keys using a different method.

Anyways theres lots of options to try in the Extra Keyboard Keys Wiki, and I'm sure one of them will solver your issue!

Offline

Board footer

Powered by FluxBB