JInput Key mappings

hi

Is it possible to read the key events in a more general way. The only available (and forced) mapping seems to be a US-American one. Well, I could simply map the American keys to the ones, that the user needs. But I (1st) don’t want to do this myself, if it is already possible in JInput and (2nd) don’t want to remap the keys, if I could access the “raw” key before it has been mapped. Unfortunately all the Indentifier/name/toString() stuff contain the American mapping only.

Marvin

Hi

In JInput, we just present whatever the OS told us. The correct key mappings seem to apply for my UK keyboard. I don’t have access to any other keyboards.

What OS and language are you trying?

Endolf

hi. Thanks for the quick reply.

So, no mapping is applied in JInput to to tell the user, that e.g. the key to the left of the main enter key was the backslash key, but not the number sign?

SuSE Linux 10.3, German.

Marvin

Correct

On windows, directx does the mapping, jinput uses direct input, so I believe keys are correctly mapped.

Linux has 2 levels at which the mapping can be applied. At the kernel level, and at the X level. If you type stuff in X and it appears right, then X is configured correctly, if you hit CTRL-ALT-F1 and go to a terminal, and type, and it’s right then the kernel should be right. It’s the kernel settings that are important to jinput. Ubuntu gets it right, I don’t know about SUSE, they may concentrate on getting X running.

HTH

Endolf

Both X and kernel are configured correctly in SuSE. But JInput still uses UK/US key mappings. Any idea?

Marvin

What does

dumpkeys -f

reveal as the key mappings?

Endolf

dumpkeys -f


Konnte keinen Dateibezeichner finden, der auf die Konsole verweist.

the translation is:


Coulnd't find any file descriptor, that points to the console.

What do I have to change, to make this work?

Marvin

IIRC you need to run it as root.

showkeys -m -t 5

and

showkeys -k -t 5

might help too.

Have you tried running

loadkeys de

and then jinput?. That might change it, assuming it’s a german keyboard you are working with.

Endolf

dumpkeys -f as root dumps a lot of these:


compose 'N' 'Y' to '�'

Don’t know, what this means.

There is not ‘showkeys’ command on my system.

I will try the loadkeys command this evening.

Marvin