Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  JInput Key mappings  (Read 2050 times)
0 Members and 1 Guest are viewing this topic.
Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Posted 2008-02-07 02:00:56 »

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
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #1 - Posted 2008-02-07 08:31:52 »

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

Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #2 - Posted 2008-02-07 11:12:14 »

hi. Thanks for the quick reply.

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.

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?

What OS and language are you trying?

SuSE Linux 10.3, German.

Marvin
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #3 - Posted 2008-02-07 21:17:01 »

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?

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

Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #4 - Posted 2008-02-07 21:44:44 »

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

Marvin
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #5 - Posted 2008-02-07 23:33:46 »

What does
1  
dumpkeys -f
reveal as the key mappings?

Endolf

Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #6 - Posted 2008-02-08 16:02:01 »

dumpkeys -f
1  
Konnte keinen Dateibezeichner finden, der auf die Konsole verweist.

the translation is:
1  
Coulnd't find any file descriptor, that points to the console.


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

Marvin
Offline endolf

JGO Coder


Medals: 7


Current project release date: sometime in 3003


« Reply #7 - Posted 2008-02-08 20:26:03 »

IIRC you need to run it as root.

1  
showkeys -m -t 5
and
1  
showkeys -k -t 5
might help too.

Have you tried running
1  
loadkeys de
and then jinput?. That *might* change it, assuming it's a german keyboard you are working with.

Endolf

Offline Marvin Fröhlich

Senior Member




May the 4th, be with you...


« Reply #8 - Posted 2008-02-09 12:26:12 »

dumpkeys -f as root dumps a lot of these:
1  
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
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (43 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!